I have two Widget having separate implementation. They are ...
MessageInboxUi
ComposeMessageUi
Both will show in fullscreen.
In mainwindow I add both widget in following sequence
ComposeMessageUi* ptrEditor = new ComposeMessageUi(this); // these are inside
MessageInboxUi * ptrInbox = new MessageInboxUi(this); // MainWindow Constructor
so when I call show function of ComposeMessageUi while MessageInboxUi is displaying, it does no display (because it displaying behind MessageInboxUi).
How can I make ComposeMessageUi to front (I mean, how can I redefined their z-order)
If you want the ComposeMessageUi to block the mainwindow set the modal flag with
void setModal(true);
If your code is not derived from QDialog you eventually need to use
void setWindowModality(Qt::ApplicationModal);
(see documentation for alternative modality modes)
To just bring your window to the front you can use:
void QWidget::raise();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With