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 open dialog box on top of the application if two screen are connected?

How to open dialog box on top of the application if two screen are connected?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qdialogsplashscreensplash
28 Posts 4 Posters 13.1k 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.
  • M mrjj
    6 Jun 2018, 20:08

    @Yash001
    Ok so Qt::SplashScreen does something with parent.

    Y Offline
    Y Offline
    Yash001
    wrote on 6 Jun 2018, 20:09 last edited by
    #18

    @mrjj May be. It is qt default function.

    M 1 Reply Last reply 6 Jun 2018, 20:19
    0
    • Y Yash001
      6 Jun 2018, 20:09

      @mrjj May be. It is qt default function.

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 6 Jun 2018, 20:19 last edited by
      #19

      @Yash001
      yeah its a windows flag.

      Y 1 Reply Last reply 6 Jun 2018, 21:27
      0
      • M mrjj
        6 Jun 2018, 20:19

        @Yash001
        yeah its a windows flag.

        Y Offline
        Y Offline
        Yash001
        wrote on 6 Jun 2018, 21:27 last edited by
        #20

        @mrjj

        dialog->setWindowFlags(Qt::SplashScreen);
        dialog->setParent(m_mainWindow);
        In this case I got dialog box on top of the screen but it is make another issue

        dialog->exec(); is not work as per expectation. without responding the to Dialog user access the other page also.

        In other word, user can access both screen Main application as well as Dialog box. how to block access on other widget until get response from the user in dialog box?

        M 1 Reply Last reply 6 Jun 2018, 21:38
        0
        • Y Yash001
          6 Jun 2018, 21:27

          @mrjj

          dialog->setWindowFlags(Qt::SplashScreen);
          dialog->setParent(m_mainWindow);
          In this case I got dialog box on top of the screen but it is make another issue

          dialog->exec(); is not work as per expectation. without responding the to Dialog user access the other page also.

          In other word, user can access both screen Main application as well as Dialog box. how to block access on other widget until get response from the user in dialog box?

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 6 Jun 2018, 21:38 last edited by
          #21

          Hi
          Im not 100% sure Qt::SplashScreen is compatiple with Qt::Dialog flag

          Qt::SplashScreen 0x0000000e | Window Indicates that the window is a splash screen. This is the default type for QSplashScreen.

          Normally used with QSplashScreen widget.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 6 Jun 2018, 21:42 last edited by
            #22

            maybe try with
            dialog->setWindowFlags(Qt::Dialog | Qt::SplashScreen);

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              Yash001
              wrote on 6 Jun 2018, 21:53 last edited by
              #23

              @mrjj it is create previous issue.

              M J 2 Replies Last reply 6 Jun 2018, 21:55
              0
              • Y Yash001
                6 Jun 2018, 21:53

                @mrjj it is create previous issue.

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 6 Jun 2018, 21:55 last edited by
                #24

                @Yash001
                but why you need Qt::SplashScreen ?
                and modal dialog ?
                cant you just use the dialog ?

                1 Reply Last reply
                1
                • Y Yash001
                  6 Jun 2018, 21:53

                  @mrjj it is create previous issue.

                  J Offline
                  J Offline
                  JonB
                  wrote on 6 Jun 2018, 21:59 last edited by
                  #25

                  @Yash001
                  Similarly to @mrjj , have you considered using QSplashScreen (http://doc.qt.io/qt-5/qsplashscreen.html), maybe it doesn't have these problems?

                  1 Reply Last reply
                  1
                  • Y Offline
                    Y Offline
                    Yash001
                    wrote on 6 Jun 2018, 22:07 last edited by
                    #26

                    I am using Qt::SplashScreen because of I wanted show dialog on the top of all screen. This dialog is show whenever specific signal is generated from Hardware Connection. if hardware is connected with PC before opening our Software then dialog will open after Software Open. and control need to transfer on dialog box. (at this time user should not access any other page).

                    I have not idea what is model Dialog.

                    M 1 Reply Last reply 6 Jun 2018, 22:09
                    0
                    • Y Yash001
                      6 Jun 2018, 22:07

                      I am using Qt::SplashScreen because of I wanted show dialog on the top of all screen. This dialog is show whenever specific signal is generated from Hardware Connection. if hardware is connected with PC before opening our Software then dialog will open after Software Open. and control need to transfer on dialog box. (at this time user should not access any other page).

                      I have not idea what is model Dialog.

                      M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 6 Jun 2018, 22:09 last edited by
                      #27

                      @Yash001
                      Modal dialog means user cannot click on mainwindow behind dialog.
                      Sometimes also called blocking.
                      comes when using exec() versus show().

                      Y 1 Reply Last reply 6 Jun 2018, 22:19
                      1
                      • M mrjj
                        6 Jun 2018, 22:09

                        @Yash001
                        Modal dialog means user cannot click on mainwindow behind dialog.
                        Sometimes also called blocking.
                        comes when using exec() versus show().

                        Y Offline
                        Y Offline
                        Yash001
                        wrote on 6 Jun 2018, 22:19 last edited by
                        #28

                        @mrjj understood. thank you.

                        1 Reply Last reply
                        0

                        27/28

                        6 Jun 2018, 22:09

                        • Login

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