“小部件的大小”是什么意思?

发布于 2024-09-07 18:32:44 字数 124 浏览 0 评论 0原文

我正在使用 QT 学习 UI 编程,我对小部件的大小意味着什么感到有点困惑。

是像素数吗?或者它的字面意思是用英寸、厘米或其他单位测量的尺寸吗?

如果以像素来衡量的话,那么实际大小不是取决于像素密度吗?

I am learning UI programming using QT and i am bit confused by what size of an widget means.

Is it the number of pixels? or does it literally mean size measured in inch, cm or something?

If it is measured in pixels, then isn't the actual size depends on the pixel density?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无需解释 2024-09-14 18:32:44

Qt 使用像素作为小部件大小的度量;但几乎没有必要使用像素显式指定小部件的大小。相反,请使用提供的布局管理功能。这样,您的应用程序/对话框布局将轻松缩放到不同的窗口或显示尺寸。

Qt uses pixels as a measure for widget size; but it's hardly ever necessary to explicitly specify the size of a widget using pixels. Instead, use the provided functionality for layout management. This way, your application/dialog layout will easily scale to different window or display sizes.

平生欢 2024-09-14 18:32:44

It actually depends on the Window Geometry. Check this one out.

alt text http://doc.qt.nokia.com/4.6/images/geometry.png

More documentation can be found here.. Hope it helps..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文