Unsolved [PySide/QWidget] Screen resize issue between monitor and laptop
I made a widget for some mechanical engineering calculations. I was developing this while I was on my monitor with screen resolution 1920x1080, while I did some test on my laptop with screen resolution 1366x768 I was surprised that I can't see whole size of my widget. Widget on my laptop screen was choped by limits of my screen on my laptop. Does anybody know how to solve this?
Hi and welcome to devnet,
The first thing to do if you haven't already is to use layouts to handle placement and sizing of your widgets.
@SGaist thanks for your reply, yes I am using also layouts. Maybe it will be better if I show screen shots differences between screens on monitor and laptop.
You can see that in monitor example I have back button, and in laptop screen that's choped off.
What do you mean by "also" ?
Are you using fixed sizes in your GUI ?
JoeCFD last edited by JoeCFD
add some top margin in the main layout and align your widgets to the top. Or add a spacer at the bottom of the main layout. Do not expect Qt is doing everything for you.
@SGaist I was thinking on layout QVBoxLayout in these groupbox, with title "Calculate transverse force" and "Calculate mate force". I am using fixed size for MainWindow size.
@Azzazil said in [PySide/QWidget] Screen resize issue between monitor and laptop:
I am using fixed size for MainWindow size.
There lies your issue.
You can use a QGridLayout or a combo of QVBoxLayout and QHBoxLayout to place your tree widgets.
@JoeCFD I don't expect, I am still learning so I don't know all Qt features.
OK so you propose that I can solve this with setContentsMargins for layouts and widgets? I will give it a shot.
@SGaist Thanks for advice, I will try to use them.
This post is deleted!