Converting between QMainWindow/QWidget/QDialog in QtDesigner
-
Is it possible to convert between these types of widgets in the designer? Say I have a QMainWindow in QtDesigner and now I'd rather it be a QDialog - is there a way to convert this to a QWidget without copying/pasting all of the subwidgets?
Thanks,
David
-
When I right click on a QMainWindow, I don't see any "morph" option.
-
You might want to try to edit the xml file that designer is. When opened design, click on Edit and there in the first couple of lines are the QMainWindow class and name.
Would try it there. Couldn't find it in Designer myself.
greetz -
In QMainWindow morph does not work, but the widget will support
-
I just had to do this (QT 6.3)
Edit the UI -> replace QMainWindow with QWidget.
Same for Class CPP & UI ...
My issue was I need to keep a constant "main menu" - I then found that my recently converted QWidget form had menu in the XML definition.
I cut this out, clean,qmake and run ... now I have a constant main-menu.
Easy fix - thanks to you starting me out in the right direction.
Tim