Pregunta

Can i have another window over main window in Qt , and how can i implement it? I have a plugin which must return another window. I created in plugin a QWidget and set it as centralWidget but my app crashes.Anyway this will not show two windows at same time . Could someone explain how to do that ?

¿Fue útil?

Solución

Any new widget created without a parent will show up as a new window. Don't try to reset 'centralWidget' unless you don't actually want the old one anymore.

If all you want is a main window whose contents change, take a look at StackedWidget.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top