“小部件的大小”是什么意思?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
它实际上取决于窗口几何。看看这个。
替代文本 http://doc.qt.nokia.com/4.6/images/ <
可以在此处找到更多文档 /a>..希望有帮助..
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..