Layout Problem
-
@Taz742
Resize the window?
Check resolution and resize your window to fit. if all in layouts - all widgets will resize.QScreen *screen = QGuiApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
int height = screenGeometry.height();
int width = screenGeometry.width(); -
@mrjj
QScreen *screen = QGuiApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
int height = screenGeometry.height();
int width = screenGeometry.width();
I got it correctly measures the resolution which I have now.
Now my mainwindow resize this screenGeometry? -
Hi,
The widgets have a minimum size that need to be respected. In you case you should maybe add a QScrollArea so the user can scroll through your UI if the screen resolution doesn't allow to show everything.
-
@Taz742 You could have all the controls in the scrollarea and just hide the scrollbar when they are all visible. Then when the resolution is the smaller one where it is needed, it would show the scrollbar again.
So it would look normal like in your screenshot at 1080p but then have a scrollbar in the smaller resolution.
-
@ambershark
I believe scrollbar is only one solution?