【问题标题】:How to get screen dimensions using Qt?如何使用 Qt 获取屏幕尺寸?
【发布时间】:2011-06-27 17:03:52
【问题描述】:

我需要使用 Qt 获取屏幕尺寸。我想我会在这里使用 Qt 移动 API: http://doc.qt.nokia.com/qtmobility-1.0-tp/

但我看不到任何可以获得屏幕尺寸 (x/y) 的东西。我错过了什么吗?

谢谢。

【问题讨论】:

标签: qt graphics


【解决方案1】:

也许QDesktopWidget 有你需要的东西?

const QRect QDesktopWidget::screenGeometry (int screen = -1) const
返回带有索引屏幕的屏幕几何图形。如果屏幕为-1,则使用默认屏幕。 另请参见 screenNumber()。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-12-11
    • 2015-07-31
    • 2023-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-13
    相关资源
    最近更新 更多