PDA

View Full Version : problem about showing my Qt application in deference desktops resolution



Alex22
11th February 2016, 10:01
While running ".exe" of my Qt application in deference desktops (whit deference resolution), when resolution of a desktop is low, mainWindow is shown bigger than size of that desktop. Because of using "QLayout", after Maximizing the mainWindow size becomes fit to the desktop but some elements like some QLabels becomes incomplete.
How can it be shown correctly in all desktops and with all resolutions?

anda_skoa
11th February 2016, 10:28
That sounds like your window contents are too large for the smaller screen.

Maybe you have minimum sizes or fixed sizes set that make it impossible for the layout to be smaller, or you need to rearrange the content.

Cheers,
_

Alex22
12th February 2016, 16:30
That sounds like your window contents are too large for the smaller screen.


You are right. Is it possible for this issues (for smaller screen), a scroll bar may appear?

anda_skoa
12th February 2016, 16:34
A scroll area would be possible if you really can't relayout to fit into the smaller size.

Alex22
12th February 2016, 20:18
A scroll area would be possible if you really can't relayout to fit into the smaller size.

please explain more how can i add scroll area?

anda_skoa
13th February 2016, 11:35
One option would be to use the QScrollArea as the main window's central widget and the current central widget as the scroll area's content widget.

Cheers,
_