Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to called any ui screen on top of parent ui screen ?

How to called any ui screen on top of parent ui screen ?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 397 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by
    #1

    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 ?

    jsulmJ 1 Reply Last reply
    0
    • Q Qt embedded developer

      @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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #4

      @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-enum Qt::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

      Q 1 Reply Last reply
      0
      • Q Qt embedded developer

        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 ?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Qt-embedded-developer Sounds like you're looking for https://doc.qt.io/qt-5/qstackedwidget.html

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Qt-embedded-developer Sounds like you're looking for https://doc.qt.io/qt-5/qstackedwidget.html

          Q Offline
          Q Offline
          Qt embedded developer
          wrote on last edited by
          #3

          @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

          JonBJ 1 Reply Last reply
          0
          • Q Qt embedded developer

            @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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #4

            @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-enum Qt::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

            Q 1 Reply Last reply
            0
            • JonBJ JonB

              @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-enum Qt::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

              Q Offline
              Q Offline
              Qt embedded developer
              wrote on last edited by Qt embedded developer
              #5

              @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

              Popupfront.png

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved