Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Is system modal dialog support in python pyqt-5/ubuntu.
Forum Updated to NodeBB v4.3 + New Features

Is system modal dialog support in python pyqt-5/ubuntu.

Scheduled Pinned Locked Moved Unsolved Qt for Python
15 Posts 3 Posters 1.6k 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.
  • Y yashi95

    hello,

    I want to know is system modal dialog support in pyside2.
    I am trying to open a dialog on top of the browser, but with that dialog able to access the browser. I want after opening the dialog not able to access any browser, first need to close dialog then able to access the dialog.

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

    @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

    I want to know is system modal dialog support in pyside2.

    It should have nothing to do with Python vs C++. But what system modal dialog call are you thinking Qt provides? I don't think platform windowing systems allow system-wide modal dialogs any longer. It would be very annoying if your application blocks access to windows belonging to other processes. I don't know what "the browser" you refer to is, Qt applications are desktop, nothing to do with some web browser window the user might have open.

    Y 1 Reply Last reply
    1
    • JonBJ JonB

      @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

      I want to know is system modal dialog support in pyside2.

      It should have nothing to do with Python vs C++. But what system modal dialog call are you thinking Qt provides? I don't think platform windowing systems allow system-wide modal dialogs any longer. It would be very annoying if your application blocks access to windows belonging to other processes. I don't know what "the browser" you refer to is, Qt applications are desktop, nothing to do with some web browser window the user might have open.

      Y Offline
      Y Offline
      yashi95
      wrote on last edited by
      #3

      @JonB
      my point with "the browser" is I created a browser in a different way but I want to open a dialog with an ok or cancel button on top of the browser, so when the dialog will open I don't want to access my browser until unless I have not clicked any button of that dialog.

      jsulmJ 1 Reply Last reply
      0
      • Y yashi95

        @JonB
        my point with "the browser" is I created a browser in a different way but I want to open a dialog with an ok or cancel button on top of the browser, so when the dialog will open I don't want to access my browser until unless I have not clicked any button of that dialog.

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

        @yashi95 So, what you actually mean is a modal dialog?

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

        Y 1 Reply Last reply
        0
        • jsulmJ jsulm

          @yashi95 So, what you actually mean is a modal dialog?

          Y Offline
          Y Offline
          yashi95
          wrote on last edited by
          #5

          @jsulm

          modal dialog means, I thought there is any modal like Application modal to make dialog which not allow using any other application(for ex- browser) until unless I have not clicked any button of that dialog.

          jsulmJ JonBJ 2 Replies Last reply
          0
          • Y yashi95

            @jsulm

            modal dialog means, I thought there is any modal like Application modal to make dialog which not allow using any other application(for ex- browser) until unless I have not clicked any button of that dialog.

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

            @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

            which not allow using any other application

            Are you sure you want to do something like this? As user I would not like such an application. User should be free to switch between different applications.

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

            Y 1 Reply Last reply
            3
            • Y yashi95

              @jsulm

              modal dialog means, I thought there is any modal like Application modal to make dialog which not allow using any other application(for ex- browser) until unless I have not clicked any button of that dialog.

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

              @yashi95
              As @jsulm & I have said, you just don't want to do this, even if it's allowed (which I'm not sure it is anyway).

              Qt/windowing system allows an application modal dialog, which means user cannot interact with any other window within the Qt application. But system modal, meaning blocking any & all other process's windows, is a really bad idea, even if you think it's convenient for your application. So I hope you won't be able to do that anyway!

              Y 1 Reply Last reply
              0
              • jsulmJ jsulm

                @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

                which not allow using any other application

                Are you sure you want to do something like this? As user I would not like such an application. User should be free to switch between different applications.

                Y Offline
                Y Offline
                yashi95
                wrote on last edited by
                #8

                @jsulm
                Yes, I want to make like this dialog, for some criteria I want to show this type of dialog.

                jsulmJ 1 Reply Last reply
                0
                • Y yashi95

                  @jsulm
                  Yes, I want to make like this dialog, for some criteria I want to show this type of dialog.

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

                  @yashi95 Which type of dialog? Application modal or system wide modal?

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

                  1 Reply Last reply
                  0
                  • JonBJ JonB

                    @yashi95
                    As @jsulm & I have said, you just don't want to do this, even if it's allowed (which I'm not sure it is anyway).

                    Qt/windowing system allows an application modal dialog, which means user cannot interact with any other window within the Qt application. But system modal, meaning blocking any & all other process's windows, is a really bad idea, even if you think it's convenient for your application. So I hope you won't be able to do that anyway!

                    Y Offline
                    Y Offline
                    yashi95
                    wrote on last edited by
                    #10

                    @JonB
                    I understand your point. But I don't want to stop all processes in the window Just want to stop only my browser which is open beside the dialog.

                    jsulmJ JonBJ 2 Replies Last reply
                    0
                    • Y yashi95

                      @JonB
                      I understand your point. But I don't want to stop all processes in the window Just want to stop only my browser which is open beside the dialog.

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

                      @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

                      Just want to stop only my browser

                      So, you need an application modal dialog, right?
                      This is easy to achieve: use exec() when showing the dialog.

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

                      JonBJ 1 Reply Last reply
                      0
                      • Y yashi95

                        @JonB
                        I understand your point. But I don't want to stop all processes in the window Just want to stop only my browser which is open beside the dialog.

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

                        @yashi95
                        You need to be much clearer about what this "browser" is. If it's a separate browser process you basically can't and shouldn't do this. But you said:

                        I created a browser in a different way

                        We need to know exactly what you mean by this.

                        Y 2 Replies Last reply
                        0
                        • jsulmJ jsulm

                          @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

                          Just want to stop only my browser

                          So, you need an application modal dialog, right?
                          This is easy to achieve: use exec() when showing the dialog.

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

                          @jsulm said in Is system modal dialog support in python pyqt-5/ubuntu.:

                          @yashi95 said in Is system modal dialog support in python pyqt-5/ubuntu.:

                          Just want to stop only my browser

                          So, you need an application modal dialog, right?
                          This is easy to achieve: use exec() when showing the dialog.

                          @yashi95
                          If you want application modal, so it blocks any and all windows in your application regardless of where in your application it is called from, you will need to pass nullptr as the parent of the modal dialog you create.

                          1 Reply Last reply
                          0
                          • JonBJ JonB

                            @yashi95
                            You need to be much clearer about what this "browser" is. If it's a separate browser process you basically can't and shouldn't do this. But you said:

                            I created a browser in a different way

                            We need to know exactly what you mean by this.

                            Y Offline
                            Y Offline
                            yashi95
                            wrote on last edited by
                            #14
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • JonBJ JonB

                              @yashi95
                              You need to be much clearer about what this "browser" is. If it's a separate browser process you basically can't and shouldn't do this. But you said:

                              I created a browser in a different way

                              We need to know exactly what you mean by this.

                              Y Offline
                              Y Offline
                              yashi95
                              wrote on last edited by
                              #15

                              @JonB
                              The browser process means chromium-browser.

                              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