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.
(obsolete)
primaryScreen : const int(obsolete)
screenCount : const int(obsolete)
virtualDesktop : const bool(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 |
(obsolete) void |
resized(int screen) |
(obsolete) void |
workAreaResized(int screen) |
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() |
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) |
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 |
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().
This is an overloaded function.
Returns the available geometry of the screen which contains p.
Use QGuiApplication::screenAt() instead.
See also screenGeometry().
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.
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.
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().
This is an overloaded function.
Returns the geometry of the screen which contains p.
Use QGuiApplication::screenAt() instead.
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.