Solved How to called any ui screen on top of parent ui screen ?
-
in my case 2nd ui come back side of first ui.
how to get the 2nd ui i need on front side and first ui in backside of 2nd ui ?
-
@Qt-embedded-developer
Given that "shutdown" is going to come on top of anything, you might give https://doc.qt.io/qt-5/qt.html#WindowType-enumQt::WindowStaysOnTopHint
a try?Is the popup which needs to come on top a
QDialog
? If so, is it application modal? https://doc.qt.io/qt-5/qdialog.html#modal-dialogs -
@Qt-embedded-developer Sounds like you're looking for https://doc.qt.io/qt-5/qstackedwidget.html
-
@jsulm no in my case it is not like stacked widget because
1] base ui class screen has several state. when first time we entering in screen one message box open which ask user to click on ok to close.
now until user not click on ok . that message box remains there.
2] now at same time from hardware switch pressed at same time one new popup with shutting down message comes.
problem : this shutdown popup need to come on top of message box but this popup comes back side of popup.
how to handle this situation so that shutdown popup comes above message box
-
@Qt-embedded-developer
Given that "shutdown" is going to come on top of anything, you might give https://doc.qt.io/qt-5/qt.html#WindowType-enumQt::WindowStaysOnTopHint
a try?Is the popup which needs to come on top a
QDialog
? If so, is it application modal? https://doc.qt.io/qt-5/qdialog.html#modal-dialogs -
@JonB i have used Qt::WindowStaysOnTopHint but it comes back side to popup
static UINT8 u8BattlowCount = 11;
u8BattlowCount--;
if(pMessageLable ==NULL)
pMessageLable = new QLabel(this);
if(IS_VALID_OBJ(pMessageLable))
{
Qt::WindowFlags flags;
flags = Qt::WindowStaysOnTopHint;
pMessageLable->setWindowFlags(flags);
QFont font(StylesheetFont_Opensans_600_16pt, 16, QFONT_BOLD);
pMessageLable->setFont(font);
if(u8BattlowCount%2 == 0)
{
pMessageLable->setText(sBattery() + " " + sLow() + "\n" + QString::number(u8BattlowCount) + "\n" + sShuttingDown());
}
else
{
pMessageLable->setText(sBattery() + " " + sLow() + "\n" + QString::number(u8BattlowCount) + "\n");
}
pMessageLable->setTextInteractionFlags(Qt::NoTextInteraction);
pMessageLable->setWordWrap(true);
pMessageLable->setAlignment(Qt::AlignCenter);
pMessageLable->setStyleSheet("color: rgb(0,0, 0);;
background-color: #FFBF00;
border: 0px solid black;
text-align: center;
border-radius:10px;");
pMessageLable->setGeometry(75, 325, 330, 150);
pMessageLable->show();
pMessageLable->activateWindow();
pMessageLable->raise();
}
if(u8BattlowCount <= 0)
{
ProcessShutdown();
}Below i shown the popup that comes front side . which i need to show on back side .
As well as i need to show backside yellow label to front side