QApplication类参考

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
virtual bool macEventFilter ( EventRef )
virtual bool winEventFilter ( MSG * )
virtual bool x11EventFilter ( XEvent * )
int x11ProcessEvent ( XEvent * event )
QFont font ( const QWidget * w = 0 )
void setFont ( const QFont & font, bool informWidgets = FALSE, const char * className = 0 )
QFontMetrics fontMetrics ()
QApplication ( int & argc, char ** argv, bool GUIenabled )
enum Type { Tty, GuiClient, GuiServer }
QApplication ( int & argc, char ** argv, Type type )
QApplication ( Display * dpy, HANDLE visual = 0, HANDLE colormap = 0 )
void setDefaultCodec ( QTextCodec * codec )
QTextCodec * defaultCodec () const
void installTranslator ( QTranslator * mf )
void removeTranslator ( QTranslator * mf )
bool startingUp ()
bool closingDown ()
void flushX ()
void flush ()
void syncX ()
void beep ()
void setWinStyleHighlightColor ( const QColor & c ) (obsolete)
int horizontalAlignment ( int align )
bool isEffectEnabled ( Qt::UIEffect effect )
void setEffectEnabled ( Qt::UIEffect effect, bool enable = TRUE )
QWSDecoration & qwsDecoration ()
int cursorFlashTime ()
void setDoubleClickInterval ( int ms )
int doubleClickInterval ()
void setWheelScrollLines ( int n )
int wheelScrollLines ()
void setGlobalStrut ( const QSize & strut )
void qwsSetDecoration ( QWSDecoration * d )
WindowsVersion winVersion ()
相关函数
void qAddPostRoutine ( QtCleanUpFunction p )
const char * qVersion ()
bool qSysInfo ( int * wordSize, bool * bigEndian )
void setStartDragTime ( int ms )
int startDragTime ()
void setStartDragDistance ( int l )
int startDragDistance ()
void setReverseLayout ( bool b )
bool reverseLayout ()
QApplication类参考
QApplication类管理图形用户界面应用程序的控制流和主要设置。详情请见……
#include <qapplication.h>
继承了QObject。
被QXtApplication继承。
所有成员函数的列表。
公有成员
QApplication ( int & argc, char ** argv )
QSize globalStrut ()
void setLibraryPaths ( const QStringList & paths )
QStringList libraryPaths ()
void addLibraryPath ( const QString & path )
void removeLibraryPath ( const QString & path )
QApplication ( Display * dpy, int argc, char ** argv, HANDLE visual = 0, HANDLE colormap = 0 )
virtual ~QApplication ()
int argc () const
char ** argv () const
void aboutToQuit ()
void guiThreadAwake ()
静态公有成员
QStyle & style ()
void setStyle ( QStyle * style )
QStyle * setStyle ( const QString & style )
int colorSpec ()
void Q_ASSERT ( bool test )
void Q_CHECK_PTR ( void * p )
QtMsgHandler qInstallMsgHandler ( QtMsgHandler h )
--------------------------------------------------------------------------------
QWidget * widgetAt ( int x, int y, bool child = FALSE )
QWidget * widgetAt ( const QPoint & pos, bool child = FALSE )
void exit ( int retcode = 0 )
bool sendEvent ( QObject * receiver, QEvent * event )
bool hasGlobalMouseTracking ()
void setGlobalMouseTracking ( bool enable )
QPalette palette ( const QWidget * w = 0 )
void setPalette ( const QPalette & palette, bool informWidgets = FALSE, const char * className = 0 )
QWidgetList * allWidgets ()
QWidgetList * topLevelWidgets ()
QDesktopWidget * desktop ()
QWidget * activePopupWidget ()
QWidget * activeModalWidget ()
QClipboard * clipboard ()
void qDebug ( const char * msg, ... )
void qWarning ( const char * msg, ... )
void qFatal ( const char * msg, ... )
void qSystemWarning ( const char * msg, int code )
void postEvent ( QObject * receiver, QEvent * event )
void sendPostedEvents ( QObject * receiver, int event_type )
void sendPostedEvents ()
void removePostedEvents ( QObject * receiver )
Type type () const
enum ColorSpec { NormalColor = 0, CustomColor = 1, ManyColor = 2 }
QWidget * mainWidget () const
virtual void setMainWidget ( QWidget * mainWidget )
QApplication对象是可以通过全局变量qApp访问。它的负责的主要范围有:
const QColor & winStyleHighlightColor () (obsolete)
void setDesktopSettingsAware ( bool on )
bool desktopSettingsAware ()
void setCursorFlashTime ( int msecs )
void setColorSpec ( int spec )
ursor * overrideCursor ()
void setOverrideCursor ( const QCursor & cursor, bool replace = FALSE )
void restoreOverrideCursor ()
void wakeUpGuiThread ()
void lock ()
void unlock ( bool wakeUpGui = TRUE )
bool locked ()
bool tryLock ()
公有槽
void quit ()
void closeAllWindows ()
信号
void lastWindowClosed ()
详细描述
QApplication类管理图形用户界面应用程序的控制流和主要设置。
它包含主事件循环,在其中来自窗口系统和其它资源的所有事件被处理和调度。它也处理应用程序的初始化和结束,并且提供对话管理。它也处理绝大多数系统范围和应用程序范围的设置。
对于任何一个使用Qt的图形用户界面应用程序,都正好存在一个QApplication对象,而不论这个应用程序在同一时间内是不是有0、1、2或更多个窗口。
bool isSessionRestored () const
QString sessionId () const
virtual void commitData ( QSessionManager & sm )
virtual void saveState ( QSessionManager & sm )
virtual bool qwsEventFilter ( QWSEvent * )
void qwsSetCustomColors ( QRgb * colorTable, int start, int numColors )
void winFocus ( QWidget * widget, bool gotFocus )
enum Encoding { DefaultCodec, UnicodeUTF8 }
QString translate ( const char * context, const char * sourceText, const char * comment = 0,Encoding encoding = DefaultCodec ) const
virtual void polish ( QWidget * w )
QWidget * focusWidget () const
QWidget * activeWindow () const
int exec ()
void processEvents ()
void processEvents ( int maxtime )
void processOneEvent ()
bool hasPendingEvents ()
int enter_loop ()
void exit_loop ()
int loopLevel () const
virtual bool notify ( QObject * receiver, QEvent * e )
相关文档
最新文档