开发者

Qt application not resizing properly

I am having a problem with resizing my gui's made from Qt.

In full screen basically they don't scale to the available 开发者_开发百科space.

Here is what i did.

1. Created a gui from Qt Designer.

Qt application not resizing properly

2. When i preview it and try to maximize it, it scales badly. The same thing happens when i use this generated code for my application(it scales badly when maximized)

Qt application not resizing properly

Qt application not resizing properly

Question: What am i doing wrong? Thanks.


You need to set a layout for your your main window and then add spacers in the main layout to keep things floating nicely.

http://doc.qt.nokia.com/4.7-snapshot/designer-manual.html

http://doc.qt.nokia.com/4.7-snapshot/designer-layouts.html


Give the whole widget a grid layoutso it knows how to resize.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜