QApplication 的类class后,为什么有个 Q_GUI_EXPORT?
RT。。。
一般是:
class 变量名 : public XXX
{
}
为什么QT 的QApplication 前面有个 “Q_GUI_EXPORT”, 做什么用的,如何理解?
class Q_GUI_EXPORT QApplication : public QCoreApplication{ Q_OBJECT Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection) Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon) Q_PROPERTY(int cursorFlashTime READ cursorFlashTime WRITE setCursorFlashTime) Q_PROPERTY(int doubleClickInterval READ doubleClickInterval WRITE setDoubleClickInterval) Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval WRITE setKeyboardInputInterval)#ifndef QT_NO_WHEELEVENT Q_PROPERTY(int wheelScrollLines READ wheelScrollLines WRITE setWheelScrollLines)#endif Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut) Q_PROPERTY(int startDragTime READ startDragTime WRITE setStartDragTime) Q_PROPERTY(int startDragDistance READ startDragDistance WRITE setStartDragDistance) Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)#ifndef QT_NO_STYLE_STYLESHEET Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)#endif#ifdef Q_WS_WINCE Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold)#endif Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled)