How to approach this multi pane resizable parts
-
Hi,
I'm not new to Qt, but it is about 10 years ago I worked with it! Now I want to create some application and I'm not sure how to approach this.
My application has a main window with some standard menu stuff and the remaining should consist of panes that can be switched on anf off. I do not want to define all these panes inside the main window (using the GUI editor). That is getting to complex. So I can define the separate panes with code, or can I use the GUI editor on just some separate pane? The borders between the panes in the main window need to be movable.
My questions are:- should I use Frames or Widgets for the panes?
- I can use layouts to arrange the panes in the main window, but how can I make them runtime resizable?
- Can I define a pane separately using the GUI editor? How do I set this up?
Any advise is welcome!
-
@Simmania said in How to approach this multi pane resizable parts:
or can I use the GUI editor
Yes, you can. Design your custom widgets in GUI editor, then instanciate them and put them where you want to have them.
"should I use Frames or Widgets for the panes?" - depends. Do you need shapes around your panes?
"but how can I make them runtime resizable?" - using https://doc.qt.io/qt-5/qsplitter.html
"Can I define a pane separately using the GUI editor? How do I set this up?" - yes, see above and https://doc.qt.io/qt-5/designer-using-custom-widgets.html
-
Thx, that helped me a lot. Yes I like to have a frame, So if that is the main difference, I can use QFrame.
I have my basis working now. Thx.
One question though: I use this QSplitter to be able to rezide the Widgets (Frames actually). But I also need to be able to switch them off programatically. Such that they dissapear and do not use screen space anymore. But the enable function just grays it out. Is there a function to make them (temporary) dissapear?
Or is the only way to do that to dynamically add/remove items to the QSplitter?