- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Friends

# QApplication Class Reference

Search for all occurrences

## Detailed Description

Definition at line 95 of file qapplication.h.

`#include <qapplication.h>`

Inheritance diagram for QApplication:
[legend]

List of all members.

## Public Types
enum | Type { Tty, GuiClient, GuiServer }
enum | ColorSpec { NormalColor = 0, CustomColor = 1, ManyColor = 2 }
## Public Slots
void | setStyleSheet (const QString &sheet)
void | setAutoSipEnabled (const bool enabled)
bool | autoSipEnabled () const
static void | closeAllWindows ()
static void | aboutQt ()
## Signals
void | lastWindowClosed ()
void | focusChanged (QWidget *old, QWidget *now)
void | fontDatabaseChanged ()
void | commitDataRequest (QSessionManager &sessionManager)
void | saveStateRequest (QSessionManager &sessionManager)
## Public Member Functions
| QApplication (int &argc, char **argv, int=QT_VERSION)
| QApplication (int &argc, char **argv, bool GUIenabled, int=QT_VERSION)
| QApplication (int &argc, char **argv, Type, int=QT_VERSION)
virtual | ~QApplication ()
bool | isSessionRestored () const
QString | sessionId () const
QString | sessionKey () const
virtual void | commitData (QSessionManager &sm)
virtual void | saveState (QSessionManager &sm)
void | setInputContext (QInputContext *)
QInputContext * | inputContext () const
bool | notify (QObject *, QEvent *)
QString | styleSheet () const
## Static Public Member Functions
static Type | type ()
static QStyle * | style ()
static void | setStyle (QStyle *)
static QStyle * | setStyle (const QString &)
static int | colorSpec ()
static void | setColorSpec (int)
static void | setGraphicsSystem (const QString &)
static QCursor * | overrideCursor ()
static void | setOverrideCursor (const QCursor &)
static void | changeOverrideCursor (const QCursor &)
static void | restoreOverrideCursor ()
static QPalette | palette ()
static QPalette | palette (const QWidget *)
static QPalette | palette (const char *className)
static void | setPalette (const QPalette &, const char *className=0)
static QFont | font ()
static QFont | font (const QWidget *)
static QFont | font (const char *className)
static void | setFont (const QFont &, const char *className=0)
static QFontMetrics | fontMetrics ()
static void | setWindowIcon (const QIcon &icon)
static QIcon | windowIcon ()
static QWidgetList | allWidgets ()
static QWidgetList | topLevelWidgets ()
static QDesktopWidget * | desktop ()
static QWidget * | activePopupWidget ()
static QWidget * | activeModalWidget ()
static QClipboard * | clipboard ()
static QWidget * | focusWidget ()
static QWidget * | activeWindow ()
static void | setActiveWindow (QWidget *act)
static QWidget * | widgetAt (const QPoint &p)
static QWidget * | widgetAt (int x, int y)
static QWidget * | topLevelAt (const QPoint &p)
static QWidget * | topLevelAt (int x, int y)
static void | syncX ()
static void | beep ()
static void | alert (QWidget *widget, int duration=0)
static Qt::KeyboardModifiers | keyboardModifiers ()
static Qt::MouseButtons | mouseButtons ()
static void | setDesktopSettingsAware (bool)
static bool | desktopSettingsAware ()
static void | setCursorFlashTime (int)
static int | cursorFlashTime ()
static void | setDoubleClickInterval (int)
static int | doubleClickInterval ()
static void | setKeyboardInputInterval (int)
static int | keyboardInputInterval ()
static void | setWheelScrollLines (int)
static int | wheelScrollLines ()
static void | setGlobalStrut (const QSize &)
static QSize | globalStrut ()
static void | setStartDragTime (int ms)
static int | startDragTime ()
static void | setStartDragDistance (int l)
static int | startDragDistance ()
static void | setLayoutDirection (Qt::LayoutDirection direction)
static Qt::LayoutDirection | layoutDirection ()
static bool | isRightToLeft ()
static bool | isLeftToRight ()
static bool | isEffectEnabled (Qt::UIEffect)
static void | setEffectEnabled (Qt::UIEffect, bool enable=true)
static QLocale | keyboardInputLocale ()
static Qt::LayoutDirection | keyboardInputDirection ()
static int | exec ()
static void | setQuitOnLastWindowClosed (bool quit)
static bool | quitOnLastWindowClosed ()
## Protected Member Functions
bool | event (QEvent *)
bool | compressEvent (QEvent *, QObject *receiver, QPostEventList *)
## Properties
Qt::LayoutDirection | layoutDirection
QIcon | windowIcon
int | cursorFlashTime
int | doubleClickInterval
int | keyboardInputInterval
int | wheelScrollLines
QSize | globalStrut
int | startDragTime
int | startDragDistance
bool | quitOnLastWindowClosed
QString | styleSheet
bool | autoSipEnabled
## Friends
class | QGraphicsWidget
class | QGraphicsItem
class | QGraphicsScene
class | QGraphicsScenePrivate
class | QWidget
class | QWidgetPrivate
class | QETWidget
class | Q3AccelManager
class | QTranslator
class | QWidgetAnimator
class | QShortcut
class | QLineEdit
class | QTextControl
class | QAction
class | QFontDatabasePrivate
class | QGestureManager

## Member Enumeration Documentation

enum Type

Search for all occurrences

Enumerator:

  Tty | Search for all occurrences
  GuiClient | Search for all occurrences
  GuiServer | Search for all occurrences

Definition at line 119 of file qapplication.h.

    { Tty, GuiClient, GuiServer };

enum ColorSpec

Search for all occurrences

Enumerator:

  NormalColor | Search for all occurrences
  CustomColor | Search for all occurrences
  ManyColor | Search for all occurrences

Definition at line 144 of file qapplication.h.

    { NormalColor=0, CustomColor=1, ManyColor=2 };

## Constructor & Destructor Documentation

QApplication | ( | int & | argc,
|  | char ** | argv,
|  | int | = `QT_VERSION`
| ) |  |

QApplication | ( | int & | argc,
|  | char ** | argv,
|  | bool | GUIenabled,
|  | int | = `QT_VERSION`
| ) |  |

QApplication | ( | int & | argc,
|  | char ** | argv,
|  | Type | ,
|  | int | = `QT_VERSION`
| ) |  |

virtual ~QApplication | ( |  | ) | `[virtual]`

## Member Function Documentation

static Type type | ( |  | ) | `[static]`

Search for all occurrences

static QStyle* style | ( |  | ) | `[static]`

Search for all occurrences

static void setStyle | ( | QStyle * |  | ) | `[static]`

Search for all occurrences

static QStyle* setStyle | ( | const QString & |  | ) | `[static]`

Search for all occurrences

static int colorSpec | ( |  | ) | `[static]`

Search for all occurrences

static void setColorSpec | ( | int |  | ) | `[static]`

Search for all occurrences

static void setGraphicsSystem | ( | const QString & |  | ) | `[static]`

Search for all occurrences

static QCursor* overrideCursor | ( |  | ) | `[static]`

Search for all occurrences

static void setOverrideCursor | ( | const QCursor & |  | ) | `[static]`

Search for all occurrences

static void changeOverrideCursor | ( | const QCursor & |  | ) | `[static]`

Search for all occurrences

static void restoreOverrideCursor | ( |  | ) | `[static]`

Search for all occurrences

static QPalette palette | ( |  | ) | `[static]`

Search for all occurrences

static QPalette palette | ( | const QWidget * |  | ) | `[static]`

Search for all occurrences

static QPalette palette | ( | const char * | className | ) | `[static]`

Search for all occurrences

static void setPalette | ( | const QPalette & | ,
|  | const char * | className = `0`
| ) |  | `[static]`

Search for all occurrences

static QFont font | ( |  | ) | `[static]`

Search for all occurrences

static QFont font | ( | const QWidget * |  | ) | `[static]`

Search for all occurrences

static QFont font | ( | const char * | className | ) | `[static]`

Search for all occurrences

static void setFont | ( | const QFont & | ,
|  | const char * | className = `0`
| ) |  | `[static]`

Search for all occurrences

static QFontMetrics fontMetrics | ( |  | ) | `[static]`

Search for all occurrences

static void setWindowIcon | ( | const QIcon & | icon | ) | `[static]`

Search for all occurrences

static QIcon windowIcon | ( |  | ) | `[static]`

Search for all occurrences

static QWidgetList allWidgets | ( |  | ) | `[static]`

Search for all occurrences

static QWidgetList topLevelWidgets | ( |  | ) | `[static]`

Search for all occurrences

static QDesktopWidget* desktop | ( |  | ) | `[static]`

Search for all occurrences

static QWidget* activePopupWidget | ( |  | ) | `[static]`

Search for all occurrences

static QWidget* activeModalWidget | ( |  | ) | `[static]`

Search for all occurrences

static QClipboard* clipboard | ( |  | ) | `[static]`

Search for all occurrences

static QWidget* focusWidget | ( |  | ) | `[static]`

Search for all occurrences

static QWidget* activeWindow | ( |  | ) | `[static]`

Search for all occurrences

static void setActiveWindow | ( | QWidget * | act | ) | `[static]`

Search for all occurrences

static QWidget* widgetAt | ( | const QPoint & | p | ) | `[static]`

Search for all occurrences

static QWidget* widgetAt | ( | int | x,
|  | int | y
| ) |  | `[inline, static]`

Search for all occurrences

Definition at line 190 of file qapplication.h.

    { return widgetAt(QPoint(x, y)); }

static QWidget* topLevelAt | ( | const QPoint & | p | ) | `[static]`

Search for all occurrences

static QWidget* topLevelAt | ( | int | x,
|  | int | y
| ) |  | `[inline, static]`

Search for all occurrences

Definition at line 192 of file qapplication.h.

    { return topLevelAt(QPoint(x, y)); }

static void syncX | ( |  | ) | `[static]`

Search for all occurrences

static void beep | ( |  | ) | `[static]`

Search for all occurrences

static void alert | ( | QWidget * | widget,
|  | int | duration = `0`
| ) |  | `[static]`

Search for all occurrences

static Qt::KeyboardModifiers keyboardModifiers | ( |  | ) | `[static]`

Search for all occurrences

static Qt::MouseButtons mouseButtons | ( |  | ) | `[static]`

Search for all occurrences

static void setDesktopSettingsAware | ( | bool |  | ) | `[static]`

Search for all occurrences

static bool desktopSettingsAware | ( |  | ) | `[static]`

Search for all occurrences

static void setCursorFlashTime | ( | int |  | ) | `[static]`

Search for all occurrences

static int cursorFlashTime | ( |  | ) | `[static]`

Search for all occurrences

static void setDoubleClickInterval | ( | int |  | ) | `[static]`

Search for all occurrences

static int doubleClickInterval | ( |  | ) | `[static]`

Search for all occurrences

static void setKeyboardInputInterval | ( | int |  | ) | `[static]`

Search for all occurrences

static int keyboardInputInterval | ( |  | ) | `[static]`

Search for all occurrences

static void setWheelScrollLines | ( | int |  | ) | `[static]`

Search for all occurrences

static int wheelScrollLines | ( |  | ) | `[static]`

Search for all occurrences

static void setGlobalStrut | ( | const QSize & |  | ) | `[static]`

Search for all occurrences

static QSize globalStrut | ( |  | ) | `[static]`

Search for all occurrences

static void setStartDragTime | ( | int | ms | ) | `[static]`

Search for all occurrences

static int startDragTime | ( |  | ) | `[static]`

Search for all occurrences

static void setStartDragDistance | ( | int | l | ) | `[static]`

Search for all occurrences

static int startDragDistance | ( |  | ) | `[static]`

Search for all occurrences

static void setLayoutDirection | ( | Qt::LayoutDirection | direction | ) | `[static]`

Search for all occurrences

static Qt::LayoutDirection layoutDirection | ( |  | ) | `[static]`

Search for all occurrences

static bool isRightToLeft | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 228 of file qapplication.h.

    { return layoutDirection() == Qt::RightToLeft; }

static bool isLeftToRight | ( |  | ) | `[inline, static]`

Search for all occurrences

Definition at line 229 of file qapplication.h.

    { return layoutDirection() == Qt::LeftToRight; }

static bool isEffectEnabled | ( | Qt::UIEffect |  | ) | `[static]`

Search for all occurrences

static void setEffectEnabled | ( | Qt::UIEffect | ,
|  | bool | enable = `true`
| ) |  | `[static]`

Search for all occurrences

bool isSessionRestored | ( |  | ) | const

Search for all occurrences

QString sessionId | ( |  | ) | const

Search for all occurrences

QString sessionKey | ( |  | ) | const

Search for all occurrences

virtual void commitData | ( | QSessionManager & | sm | ) | `[virtual]`

Search for all occurrences

virtual void saveState | ( | QSessionManager & | sm | ) | `[virtual]`

Search for all occurrences

void setInputContext | ( | QInputContext * |  | ) |

Search for all occurrences

QInputContext* inputContext | ( |  | ) | const

Search for all occurrences

static QLocale keyboardInputLocale | ( |  | ) | `[static]`

Search for all occurrences

static Qt::LayoutDirection keyboardInputDirection | ( |  | ) | `[static]`

Search for all occurrences

static int exec | ( |  | ) | `[static]`

Search for all occurrences

Reimplemented from QCoreApplication.

bool notify | ( | QObject * | ,
|  | QEvent * |
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QCoreApplication.

static void setQuitOnLastWindowClosed | ( | bool | quit | ) | `[static]`

Search for all occurrences

static bool quitOnLastWindowClosed | ( |  | ) | `[static]`

Search for all occurrences

void lastWindowClosed | ( |  | ) | `[signal]`

Search for all occurrences

void focusChanged | ( | QWidget * | old,
|  | QWidget * | now
| ) |  | `[signal]`

Search for all occurrences

void fontDatabaseChanged | ( |  | ) | `[signal]`

Search for all occurrences

void commitDataRequest | ( | QSessionManager & | sessionManager | ) | `[signal]`

Search for all occurrences

void saveStateRequest | ( | QSessionManager & | sessionManager | ) | `[signal]`

Search for all occurrences

QString styleSheet | ( |  | ) | const

Search for all occurrences

void setStyleSheet | ( | const QString & | sheet | ) | `[slot]`

Search for all occurrences

void setAutoSipEnabled | ( | const bool | enabled | ) | `[slot]`

Search for all occurrences

bool autoSipEnabled | ( |  | ) | const `[slot]`

Search for all occurrences

static void closeAllWindows | ( |  | ) | `[static, slot]`

Search for all occurrences

static void aboutQt | ( |  | ) | `[static, slot]`

Search for all occurrences

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QCoreApplication.

bool compressEvent | ( | QEvent * | ,
|  | QObject * | receiver,
|  | QPostEventList * |
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from QCoreApplication.

## Friends And Related Function Documentation

friend class QGraphicsWidget `[friend]`

Search for all occurrences

Definition at line 381 of file qapplication.h.

friend class QGraphicsItem `[friend]`

Search for all occurrences

Definition at line 382 of file qapplication.h.

friend class QGraphicsScene `[friend]`

Search for all occurrences

Definition at line 383 of file qapplication.h.

friend class QGraphicsScenePrivate `[friend]`

Search for all occurrences

Definition at line 384 of file qapplication.h.

friend class QWidget `[friend]`

Search for all occurrences

Reimplemented from QCoreApplication.

Definition at line 385 of file qapplication.h.

friend class QWidgetPrivate `[friend]`

Search for all occurrences

Reimplemented from QCoreApplication.

Definition at line 386 of file qapplication.h.

friend class QETWidget `[friend]`

Search for all occurrences

Reimplemented from QCoreApplication.

Definition at line 387 of file qapplication.h.

friend class Q3AccelManager `[friend]`

Search for all occurrences

Reimplemented from QCoreApplication.

Definition at line 388 of file qapplication.h.

friend class QTranslator `[friend]`

Search for all occurrences

Definition at line 389 of file qapplication.h.

friend class QWidgetAnimator `[friend]`

Search for all occurrences

Definition at line 390 of file qapplication.h.

friend class QShortcut `[friend]`

Search for all occurrences

Definition at line 392 of file qapplication.h.

friend class QLineEdit `[friend]`

Search for all occurrences

Definition at line 393 of file qapplication.h.

friend class QTextControl `[friend]`

Search for all occurrences

Definition at line 394 of file qapplication.h.

friend class QAction `[friend]`

Search for all occurrences

Definition at line 396 of file qapplication.h.

friend class QFontDatabasePrivate `[friend]`

Search for all occurrences

Definition at line 397 of file qapplication.h.

friend class QGestureManager `[friend]`

Search for all occurrences

Definition at line 406 of file qapplication.h.

## Property Documentation

Qt::LayoutDirection layoutDirection `[read, write]`

Search for all occurrences

Definition at line 98 of file qapplication.h.

QIcon windowIcon `[read, write]`

Search for all occurrences

Definition at line 99 of file qapplication.h.

int cursorFlashTime `[read, write]`

Search for all occurrences

Definition at line 100 of file qapplication.h.

int doubleClickInterval `[read, write]`

Search for all occurrences

Definition at line 101 of file qapplication.h.

int keyboardInputInterval `[read, write]`

Search for all occurrences

Definition at line 102 of file qapplication.h.

int wheelScrollLines `[read, write]`

Search for all occurrences

Definition at line 104 of file qapplication.h.

QSize globalStrut `[read, write]`

Search for all occurrences

Definition at line 106 of file qapplication.h.

int startDragTime `[read, write]`

Search for all occurrences

Definition at line 107 of file qapplication.h.

int startDragDistance `[read, write]`

Search for all occurrences

Definition at line 108 of file qapplication.h.

bool quitOnLastWindowClosed `[read, write]`

Search for all occurrences

Definition at line 109 of file qapplication.h.

QString styleSheet `[read, write]`

Search for all occurrences

Definition at line 111 of file qapplication.h.

bool autoSipEnabled `[read, write]`

Search for all occurrences

Definition at line 116 of file qapplication.h.

The documentation for this class was generated from the following file:

- QtGui/qapplication.h

QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication
QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication QApplication