Obsolete Members for QDesktopWidget
The following members of class QDesktopWidget are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Properties
(obsolete)
primaryScreen : const int(obsolete)
screenCount : const int(obsolete)
virtualDesktop : const bool(obsolete)
windowIconText : QString
Public Functions
(obsolete) const QRect | availableGeometry(int screen = -1) const |
(obsolete) const QRect | availableGeometry(const QPoint &p) const |
(obsolete) | dumpObjectInfo() |
(obsolete) | dumpObjectTree() |
(obsolete) bool | isEnabledToTLW() const |
(obsolete) bool | isTopLevel() const |
(obsolete) int | numScreens() const |
(obsolete) QWidget * | screen(int screen = -1) |
(obsolete) const QRect | screenGeometry(int screen = -1) const |
(obsolete) const QRect | screenGeometry(const QPoint &p) const |
(obsolete) int | screenNumber(const QPoint &point) const |
(obsolete) QWidget * | topLevelWidget() const |
Signals
(obsolete) void | resized(int screen) |
(obsolete) void | workAreaResized(int screen) |
Member Function Documentation
const QRect QDesktopWidget::availableGeometry(int screen = -1) const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Returns the available geometry of the screen with index screen. What is available will be subrect of screenGeometry() based on what the platform decides is available (for example excludes the dock and menu bar on macOS, or the task bar on Windows). The default screen is used if screen is -1.
Use QGuiApplication::screens() instead.
See also screenNumber(), screenGeometry(), and QScreen::availableGeometry().
const QRect QDesktopWidget::availableGeometry(const QPoint &p) const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This is an overloaded function.
Returns the available geometry of the screen which contains p.
Use QGuiApplication::screenAt() instead.
See also screenGeometry().
int QDesktopWidget::numScreens() const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Returns the number of available screens.
Use QGuiApplication::screens() instead.
See also primaryScreen.
[signal]
void QDesktopWidget::primaryScreenChanged()
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This signal is emitted whenever the primary screen changes.
Note: This doesn't mean the QDesktopWidget::primaryScreen index will necessarily be different, but now it will refer to the new primary screen.
Use QGuiApplication::primaryScreenChanged() instead.
This function was introduced in Qt 5.6.
Note: Notifier signal for property primaryScreen.
See also primaryScreen and screenGeometry().
[signal]
void QDesktopWidget::resized(int screen)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This signal is emitted when the size of screen changes.
Use QScreen::geometryChanged() instead.
QWidget *QDesktopWidget::screen(int screen = -1)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Returns a widget that represents the screen with index screen (a value of -1 means the default screen).
If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop; i.e., bounding every screen.
Use QScreen instead.
See also primaryScreen, screenCount, and virtualDesktop.
[signal]
void QDesktopWidget::screenCountChanged(int newCount)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This signal is emitted when the number of screens changes to newCount.
Use QGuiApplication::screenAdded and QGuiApplication::screenRemoved() instead.
This function was introduced in Qt 4.6.
Note: Notifier signal for property screenCount.
See also screenCount.
const QRect QDesktopWidget::screenGeometry(int screen = -1) const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Returns the geometry of the screen with index screen. The default screen is used if screen is -1.
Use QGuiApplication::screens() instead.
See also screenNumber().
const QRect QDesktopWidget::screenGeometry(const QPoint &p) const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This is an overloaded function.
Returns the geometry of the screen which contains p.
Use QGuiApplication::screenAt() instead.
int QDesktopWidget::screenNumber(const QPoint &point) const
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This is an overloaded function.
Returns the index of the screen that contains the point, or the screen which is the shortest distance from the point.
Use QGuiApplication::screenAt() instead.
See also primaryScreen.
[signal]
void QDesktopWidget::workAreaResized(int screen)
This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This signal is emitted when the work area available on screen changes.
Use QScreen::availableGeometryChanged() instead.
© 2021 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 the GNU 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.