QApplication 過時成員

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

靜態公共成員

(deprecated in 6.0) QFontMetrics fontMetrics ()
(deprecated in 6.5) void setActiveWindow (QWidget * active )

成員函數文檔編製

[static, deprecated in 6.0] QFontMetrics QApplication:: fontMetrics ()

This function is deprecated since 6.0. We strongly advise against using it in new code.

使用 QFontMetricsF ( qApp -> font ()) instead.

Returns display (screen) font metrics for the application font. For more information about the difference between QFontMetrics and QFontMetricsF , see the detailed description of QFontMetrics .

另請參閱 font (), setFont (), QWidget::fontMetrics (),和 QPainter::fontMetrics ().

[static, deprecated in 6.5] void QApplication:: setActiveWindow ( QWidget * active )

This function is deprecated since 6.5. We strongly advise against using it in new code.

使用 QWidget::activateWindow () 代替。

將活動窗口設為 active 小部件以響應係統事件。函數調用自平颱特定事件處理程序。

警告: 此函數做 not 設置活動 Widget 的鍵盤聚焦。調用 QWidget::activateWindow () 代替。

它設置 activeWindow () 和 focusWidget () 屬性並發送適當 WindowActivate / WindowDeactivate and FocusIn / FocusOut 事件到所有閤適 Widget。然後,將按活動狀態描繪窗口 (如:行編輯中的光標會眨眼),且它將啓用工具提示。

另請參閱 activeWindow () 和 QWidget::activateWindow ().