QDesktopWidget 過時成員

以下成員源於類 QDesktopWidget 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

特性

公共函數

(obsolete) const QRect availableGeometry (int screen = -1) const
(obsolete) const QRect availableGeometry (const QPoint & p ) const
(obsolete) bool isVirtualDesktop () const
(obsolete) int numScreens () const
(obsolete) int primaryScreen () const
(obsolete) QWidget * screen (int screen = -1)
(obsolete) int screenCount () const
(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 primaryScreenChanged ()
(obsolete) void resized (int screen )
(obsolete) void screenCountChanged (int newCount )
(obsolete) void workAreaResized (int screen )

特性文檔編製

primaryScreen : const int

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This property holds the index of the screen that is configured to be the primary screen on the system.

使用 QGuiApplication::primaryScreen () 代替。

訪問函數:

int primaryScreen () const

通知程序信號:

void primaryScreenChanged ()

screenCount : const int

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This property holds the number of screens currently available on the system.

使用 QGuiApplication::screens () 代替。

該特性在 Qt 4.6 引入。

訪問函數:

int screenCount () const

通知程序信號:

void screenCountChanged (int newCount )

virtualDesktop : const bool

This property is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

if the system manages the available screens in a virtual desktop.

對於虛擬桌麵, screen () 將始終返迴相同 Widget。虛擬桌麵的大小就是此桌麵 Widget 的大小。

使用 QScreen::virtualSiblings () of primary screen instead.

訪問函數:

bool isVirtualDesktop () const

成員函數文檔編製

[signal] void QDesktopWidget:: primaryScreenChanged ()

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

此信號被發射每當首要屏幕改變時。

注意: 這並不意味著 QDesktopWidget::primaryScreen 索引必然不同,但現在它會引用新的首要屏幕。

使用 QGuiApplication::primaryScreenChanged () 代替。

注意: 通知程序信號對於特性 primaryScreen .

該函數在 Qt 5.6 引入。

另請參閱 primaryScreen and screenGeometry ().

[signal] void QDesktopWidget:: resized ( int screen )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

此信號被發射當尺寸對於 screen 改變。

使用 QScreen::geometryChanged () 代替。

[signal] void QDesktopWidget:: screenCountChanged ( int newCount )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

此信號被發射當屏幕數改變成 newCount .

使用 QGuiApplication::screenAdded and QGuiApplication::screenRemoved () 代替。

注意: 通知程序信號對於特性 screenCount .

該函數在 Qt 4.6 引入。

另請參閱 screenCount .

[signal] void QDesktopWidget:: workAreaResized ( int screen )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

此信號發射,當工作區域可用於 screen 改變。

使用 QScreen::availableGeometryChanged () 代替。

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 為 -1。

使用 QGuiApplication::screens () 代替。

另請參閱 screenNumber (), screenGeometry (),和 QScreen::availableGeometry ().

const QRect QDesktopWidget:: availableGeometry (const QPoint & p ) const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

這是重載函數。

返迴屏幕的可用幾何體,其包含 p .

使用 QGuiApplication::screenAt () 代替。

另請參閱 screenGeometry ().

int QDesktopWidget:: numScreens () const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

返迴可用屏幕的編號。

使用 QGuiApplication::screens () 代替。

另請參閱 primaryScreen .

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 .

使用 QScreen 代替。

另請參閱 primaryScreen , screenCount ,和 virtualDesktop .

const QRect QDesktopWidget:: screenGeometry ( int screen = -1) const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

Returns the geometry of the screen with index screen . The default screen is used if screen 為 -1。

使用 QGuiApplication::screens () 代替。

另請參閱 screenNumber ().

const QRect QDesktopWidget:: screenGeometry (const QPoint & p ) const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

這是重載函數。

返迴屏幕的幾何體,其包含 p .

使用 QGuiApplication::screenAt () 代替。

int QDesktopWidget:: screenNumber (const QPoint & point ) const

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

這是重載函數。

Returns the index of the screen that contains the point , or the screen which is the shortest distance from the point .

使用 QGuiApplication::screenAt () 代替。

另請參閱 primaryScreen .