Can't promote custom QDialog in Qt Designer
-
Hi all,
I'm starting with ui-development in Qt and ran in this Problem
I'm using Qt-Designer (Linux/5.15.3).
I try to promote a custom QDialog class, but QtDesigner lacks the option to promote QDialog
Other widgets can be promoted, but not QDialog

Is this simply not possible or am I missing something?TIA
-
@mpergand thanks for your answer.
From my understanding, I need to overrride the 'done' method in Order to stop the dialog from closing if for example the input validation fails.
Therefore I derived my custom dialog.@murphy607
When you create your dialog, you use your custom class, isn't it ?
you do;
MyDialog* dial=new MyDialog();
and the interface is created by setUpUi()
The ui file doesn't create the root widget by itself. -
@mpergand thanks for your answer.
From my understanding, I need to overrride the 'done' method in Order to stop the dialog from closing if for example the input validation fails.
Therefore I derived my custom dialog.@murphy607
When you create your dialog, you use your custom class, isn't it ?
you do;
MyDialog* dial=new MyDialog();
and the interface is created by setUpUi()
The ui file doesn't create the root widget by itself. -
@mpergand Ummm.... Why not? What if I have a Qdialog which is used stand-alone in one case, i.e. for testing purposes, then I want to place the whole Qdialog into a parent Qdialog? What is the proper way to proceed then?
-
@mpergand Ummm.... Why not? What if I have a Qdialog which is used stand-alone in one case, i.e. for testing purposes, then I want to place the whole Qdialog into a parent Qdialog? What is the proper way to proceed then?
@montanaviking said in Can't promote custom QDialog in Qt Designer:
What is the proper way to proceed then?
The proper way is not to do this.
You don't place aQDialoginside anotherQDialog, makes no sense and is bad design.
There are better alternatives to achieve whatever you are trying to do.