qwidget set position
Python hosting: Host, run, and code Python in the cloud!
PyQt5 supports several layout methods such as grid layouts, horzontal layous and absolute positioning. The layout you should pick depends on your preference and type of application.
Related course:
Create GUI Apps with PyQt5
PyQt5 absolute positioning
Absolute positioning gives you total control over the widget positions but you have to explicitly define every widget location.
Widgets can be added on an absolute position using the move(x,y) method.

PyQt5 widget positioning example
The example below puts widgets on the absolute positions using the move() method.
They are added to a PyQT5 window (QMainWindow) which has some properties set in initUI().
|
If you are new to programming Python PyQt, I highly recommend this book.
Posted in PyQt5
Leave a Reply: