Qt 3 Support Members for QApplicationThe following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.
Public Types
Static Public Members
Member Type Documentation
typedef QApplication::ColorMode
Use ColorSpec instead.
Member Function Documentation
ColorMode QApplication::colorMode () [static]
Use colorSpec() instead, and use ColorSpec as the enum type.
See also setColorMode().
void QApplication::flushX () [static]
Use flush() instead.
bool QApplication::hasGlobalMouseTracking () [static]
This feature does not exist anymore. This function always returns true in Qt 4.
Qt::Alignment QApplication::horizontalAlignment ( Qt::Alignment align ) [static]
Strips out vertical alignment flags and transforms an alignment align of Qt::AlignLeft into Qt::AlignLeft or Qt::AlignRight according to the language used.
Use QSysInfo::MacintoshVersion instead.
QWidget * QApplication::mainWidget () [static]
Returns the main application widget, or 0 if there is no main widget.
See also setMainWidget().
bool QApplication::reverseLayout () [static]
Use layoutDirection() instead.
See also setReverseLayout().
void QApplication::setColorMode ( ColorMode mode ) [static]
Use setColorSpec() instead, and pass a ColorSpec value instead.
See also colorMode().
void QApplication::setFont ( const QFont & font, bool b, const char * className = 0 ) [static]
Use the two-argument overload instead.
void QApplication::setGlobalMouseTracking ( bool dummy ) [static]
This function does nothing in Qt 4. The dummy parameter is ignored.
See also hasGlobalMouseTracking().
void QApplication::setMainWidget ( QWidget * mainWidget ) [static]
Sets the application's main widget to mainWidget.
In most respects the main widget is like any other widget, except that if it is closed, the application exits. QApplication does not take ownership of the mainWidget, so if you create your main widget on the heap you must delete it yourself.
You need not have a main widget; connecting lastWindowClosed() to quit() is an alternative.
On X11, this function also resizes and moves the main widget according to the -geometry command-line option, so you should set the default geometry (using QWidget::setGeometry()) before calling setMainWidget().
See also mainWidget(), exec(), and quit().
void QApplication::setOverrideCursor ( const QCursor & cursor, bool replace ) [static]
Use changeOverrideCursor(cursor) (if replace is true) or setOverrideCursor(cursor) (if replace is false).
void QApplication::setPalette ( const QPalette & pal, bool b, const char * className = 0 ) [static]
Use the two-argument overload instead.
void QApplication::setReverseLayout ( bool reverse ) [static]
Use setLayoutDirection() instead.
See also reverseLayout().
void QApplication::setWinStyleHighlightColor ( const QColor & c ) [static]
Use the palette instead.
For example, if you have code like
app.setWinStyleHighlightColor(color);
you can rewrite it as
QPalette palette(QApplication::palette());
palette.setColor(QPalette::Highlight, color);
QApplication::setPalette(palette);
See also winStyleHighlightColor().
QWidget * QApplication::widgetAt ( int x, int y, bool child ) [static]
Use the two-argument widgetAt() overload to get the child widget. To get the top-level widget do this:
QWidget *widget = qApp->widgetAt(x, y);
if (widget)
widget = widget->window();
QWidget * QApplication::widgetAt ( const QPoint & point, bool child ) [static]
Use the single-argument widgetAt() overload to get the child widget. To get the top-level widget do this:
QWidget *widget = qApp->widgetAt(point);
if (widget)
widget = widget->window();
const QColor & QApplication::winStyleHighlightColor () [static]
Use QApplication::palette().color(QPalette::Active, QPalette::Highlight) instead.
See also setWinStyleHighlightColor().
Qt::WindowsVersion QApplication::winVersion () [static]
Use QSysInfo::WindowsVersion instead.
Member Variable Documentation
const int QApplication::CustomColors
Use CustomColor instead.
const int QApplication::NormalColors
Use NormalColor instead.
|
|
Best Of
Actualités les plus lues
Le Qt Quarterly au hasard
Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.
Communauté
Ressources
Liens utiles
Contact
- Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).
Qt dans le magazine
|