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
- 1 property inherited from QWidget
Public Functions
(obsolete) const QRect | availableGeometry(int screen = -1) const |
(obsolete) const QRect | availableGeometry(const QPoint &p) 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 |
Signals
(obsolete) void | resized(int screen) |
(obsolete) void | workAreaResized(int screen) |
Property Documentation
primaryScreen : const int
This property holds the index of the screen that is configured to be the primary screen on the system.
Use QGuiApplication::primaryScreen() instead.
Access functions:
int | primaryScreen() const |
Notifier signal:
void | primaryScreenChanged() |
screenCount : const int
This property holds the number of screens currently available on the system.
Use QGuiApplication::screens() instead.
This property was introduced in Qt 4.6.
Access functions:
int | screenCount() const |
Notifier signal:
void | screenCountChanged(int newCount) |
virtualDesktop : const bool
if the system manages the available screens in a virtual desktop.
For virtual desktops, screen() will always return the same widget. The size of the virtual desktop is the size of this desktop widget.
Use QScreen::virtualSiblings() of primary screen instead.
Access functions:
bool | isVirtualDesktop() const |
Member Function Documentation
const QRect QDesktopWidget::availableGeometry(int screen = -1) const
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 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
Returns the number of available screens.
Use QGuiApplication::screens() instead.
See also primaryScreen.
[signal]
void QDesktopWidget::primaryScreenChanged()
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 signal is emitted when the size of screen changes.
Use QScreen::geometryChanged() instead.
QWidget *QDesktopWidget::screen(int screen = -1)
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 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
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 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 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 signal is emitted when the work area available on screen changes.
Use QScreen::availableGeometryChanged() instead.
© 2018 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.