0

I have maximized application created by QT. My screen resolution is 1920x1080 and MainWindow set geometry is 1920x1080 too. But this have problem when I run my application on other resolution like 1366x728, buttons, images placed out of screen resolution.

How to create scalable app in Qt? for support multi screen resolutions. (Only Windows).

halfer
  • 19,824
  • 17
  • 99
  • 186
Sina
  • 15
  • 5
  • 1
    Are all your widgets etc. inside of a layout? resizing etc. Only works smoothly in Qt If your main window has a layout any everything in it is also in a layout in some way. – Hayt Oct 27 '16 at 12:37
  • nope. i not use the layouts ! by use the layouts all screen sizes are supported? or something ? thank you – Sina Oct 27 '16 at 12:40
  • When you use layouts resizing is supported. You can change the size of the window (no matter if maximized or not) and the widgets will resize with it. You can specify maximum and minimum sized and how they should resize. Though most Widgets are having good default settings on that. – Hayt Oct 27 '16 at 12:42
  • 2
    Possible duplicate of [How to make a Qt Widget grow with the window size?](http://stackoverflow.com/questions/6044836/how-to-make-a-qt-widget-grow-with-the-window-size) – Hayt Oct 27 '16 at 12:44
  • Thank you very much. :) Form Layout is good or Grid Layout? – Sina Oct 27 '16 at 12:44
  • You have some information in the "duplicate" also here is a good start to read: http://doc.qt.io/qt-5/designer-layouts.html What kind of layout depends on how your application should look like. Read about them and judge by yourself :) – Hayt Oct 27 '16 at 12:45
  • You can also override `resizeEvent(QResizeEvent *)` of your application to calculate your widgets size/position programmatically, but as @Hayt suggested, layout is less painful – Ayak973 Oct 27 '16 at 12:46
  • "buttons, images placed out of screen resolution." What does that mean? Can you give an example of what you have and what you would like to achieve? Do you want scale everything including font sizes? – NoDataDumpNoContribution Oct 27 '16 at 13:39

0 Answers0