Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

Compatibility Members for QApplication

The following members of classQApplicationare part of the Qt compatibility layer. We advise against using them in new code.

Public Types

typedefColorMode

Static Public Members

const intCustomColors
const intNormalColors
ColorModecolorMode()
voidflushX()
boolhasGlobalMouseTracking()
Qt::MacintoshVersionmacVersion()
QWidget *mainWidget()
boolreverseLayout()
voidsetColorMode(ColorMode mode)
voidsetFont(const QFont & font, bool b, const char * className = 0)
voidsetGlobalMouseTracking(bool dummy)
voidsetMainWidget(QWidget * mainWidget)
voidsetOverrideCursor(const QCursor & cursor, bool replace)
voidsetPalette(const QPalette & pal, bool b, const char * className = 0)
voidsetReverseLayout(bool reverse)
voidsetWinStyleHighlightColor(const QColor & c)
QWidget *widgetAt(int x, int y, bool child)
QWidget *widgetAt(const QPoint & point, bool child)
const QColor &winStyleHighlightColor()
Qt::WindowsVersionwinVersion()

Member Type Documentation

typedef QApplication::ColorMode

UseColorSpec instead.

Member Function Documentation

[static]ColorMode QApplication::colorMode()

UsecolorSpec() instead, and useColorSpec as the enum type.

See alsosetColorMode().

[static]void QApplication::flushX()

Useflush() instead.

[static]bool QApplication::hasGlobalMouseTracking()

This feature does not exist anymore. This function always returns true in Qt 4.

[static]Qt::MacintoshVersion QApplication::macVersion()

UseQSysInfo::MacintoshVersion instead.

[static]QWidget * QApplication::mainWidget()

Returns the main application widget, or 0 if there is no main widget.

See alsosetMainWidget().

[static]bool QApplication::reverseLayout()

UselayoutDirection() instead.

See alsosetReverseLayout().

[static]void QApplication::setColorMode(ColorMode mode)

UsesetColorSpec() instead, and pass aColorSpec value instead.

See alsocolorMode().

[static]void QApplication::setFont(constQFont & font,bool b, constchar * className = 0)

Use the two-argument overload instead.

[static]void QApplication::setGlobalMouseTracking(bool dummy)

This function does nothing in Qt 4. Thedummy parameter is ignored.

See alsohasGlobalMouseTracking().

[static]void QApplication::setMainWidget(QWidget * mainWidget)

Sets the application's main widget tomainWidget.

In most respects the main widget is like any other widget, except that if it is closed, the application exits.QApplication doesnot take ownership of themainWidget, so if you create your main widget on the heap you must delete it yourself.

You need not have a main widget; connectinglastWindowClosed() toquit() 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 (usingQWidget::setGeometry()) before calling setMainWidget().

See alsomainWidget(),exec(), andquit().

[static]void QApplication::setOverrideCursor(constQCursor & cursor,bool replace)

UsechangeOverrideCursor(cursor) (ifreplace is true) orsetOverrideCursor(cursor) (ifreplace is false).

[static]void QApplication::setPalette(constQPalette & pal,bool b, constchar * className = 0)

Use the two-argument overload instead.

[static]void QApplication::setReverseLayout(bool reverse)

UsesetLayoutDirection() instead.

See alsoreverseLayout().

[static]void QApplication::setWinStyleHighlightColor(constQColor & c)

Use the palette instead.

For example, if you have code like

app.setWinStyleHighlightColor(color);

you can rewrite it as

QPalettepalette(QApplication::palette());palette.setColor(QPalette::Highlight, color);QApplication::setPalette(palette);

See alsowinStyleHighlightColor().

[static]QWidget * QApplication::widgetAt(int x,int y,bool child)

Use the two-argumentwidgetAt() 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();

[static]QWidget * QApplication::widgetAt(constQPoint & point,bool child)

Use the single-argumentwidgetAt() overload to get the child widget. To get the top-level widget do this:

QWidget*widget= qApp->widgetAt(point);if (widget)    widget= widget->window();

[static]constQColor & QApplication::winStyleHighlightColor()

UseQApplication::palette().color(QPalette::Active,QPalette::Highlight) instead.

See alsosetWinStyleHighlightColor().

[static]Qt::WindowsVersion QApplication::winVersion()

UseQSysInfo::WindowsVersion instead.

Member Variable Documentation

constint QApplication::CustomColors

UseCustomColor instead.

constint QApplication::NormalColors

UseNormalColor instead.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp