QtDesigner container plugin with custom page class
-
wrote on 23 Dec 2011, 08:42 last edited by
Hi, everyone! I develop a custom multi-page widget. I want to be able to manage a page list in QtDesigner. As I know, the best is to use QDesignerContainerExtension class to archive this goal. But I need that pages be custom classes, not a QWidget. How can I archive this? Thank in advance!
-
wrote on 23 Dec 2011, 13:59 last edited by
In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)
-
wrote on 26 Dec 2011, 05:30 last edited by
Thank you for this suggestion! Will I see the actual type of a page widget in the object tree and the property editor? It would be perfect :)
[quote author="Olivier Goffart" date="1324648773"]In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)[/quote] -
In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)
wrote on 23 Jan 2024, 09:14 last edited by redtide@ogoffart In your impementation of QDesignerContainerExtension::insertWidget, you can create your own custom widget instead of using directly the one passed as parametter (maybe you can just ignore it or you need to call deleteLater on it)
I tried this and I'm pretty sure you can't do it in Qt 5.15 at least, you end up with a Qt Designer warning dialog saying that that's an unmanaged widget and you should use the domXml() instead (Heaven knows how); at some point later it makes crash the designer when adding a child to the custom widget page.