Solved Splitting Up a UI From
-
Situation:
- I have one very bloated UI Form that centers around a QStackedWidget
- Within the QStackedWidget are large QWidgets
- I am using QT Designer for the UI Form
What I Want to Achieve:
- Split the bloated UI Form into separate Forms, one main Form for my QStackedWidget and then other Forms for the smaller internal QWidgets
- Once I have my seperate forms, I can easily just set the parent of each form's top parent to my QStackedWidget when I run my applications setup (c++)
Problems:
- Within QT Desinger, the highest Parent is always of type QMainWindow, I would like it to be of type QWidget for my internal QWidget Forms
- I cannot select and cut out a Widget
Notes:
- I am aware I could do this in code, but my widgets are very complex and precisely set up with layouts
- QT Desinger 5.13
-
Use 'Widget' as template when creating a new form in designer.
-
Use 'Widget' as template when creating a new form in designer.
-
@Christian-Ehrlicher
Thank you, I was completely unaware that you could do that.What about the other 1/2 of my problem, the ability to cut out an internal QWidget (so that I can copy into this new template)?
-
@AlexanderAlexander said in Splitting Up a UI From:
the ability to cut out an internal QWidget (so that I can copy into this new template)?
I don't understand this - simply instantiate the widget and put it where you want.
-
@AlexanderAlexander you can literally select the content of on of your QStackwidget pages, copy it (ctrl + c) and on the new form, paste (ctrl + v) it.
The only restriction is, that you copy target does not yet have a layout
-
@J-Hilk
Thats the issue then, I did not know you couldn't copy if they already have a layout... That's unfortunate since my inner widgets are also complex :(Anyway, thanks for the help guys
-
@AlexanderAlexander well only the top most layout you can not transfer over, all others (nested ones), you can select and copy just fine