I have a few widgets in a main window. i want the user to be able to resize the widgets inside the window as they please, just like how one would resize the main window. Do I have to make a layout container to enable this? or ....layout? Buh the layout contains are static once the window is rendered. In the picture the three widgets should be enable with resizing such that the user can drag their sides/corners to expand or minimize the widget size.
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
- QGraphicsView / QGraphicsScene size matching
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
- how do I correctly return values from pyqt to Java
One thing you could do is to use some
QSplitter
's though it isn't directly as nuanced as you pointed out. Have a look at the image (you can drag the handles):Another thing is to place the widgets using absolute coordinates and then detect when the cursor is clicked and dragged on the "edge". Then you calculate how much it should be resized and actually resize the widget according to its position.
You could also have a look at the
QMdiArea
and then add your widgets usingaddSubWindow()
where you also set the window flags.