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. Different modal behavior
Forum Updated to NodeBB v4.3 + New Features

Different modal behavior

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmllinux
10 Posts 3 Posters 2.2k Views 2 Watching
  • 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.
  • D Offline
    D Offline
    DRoscoe
    wrote on last edited by
    #1

    I have a modal dialog box which behaves differently on Windows than on Linux. When the modal comes up on Windows, it prevents me from interacting in any way with the application window, including moving it around. I believe this to be the correct behavior. On linux, however, the controls are disabled, but I can still click and drag the main application window around.

    Is there any way to make this stop?

    kshegunovK 1 Reply Last reply
    0
    • D Offline
      D Offline
      DRoscoe
      wrote on last edited by DRoscoe
      #2

      Additional info. I can also minimize, maximize from the main application window, but cannot close the application

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        There are some things that might be handled differently by the underlying window manager. Which one are you using ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        D 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi,

          There are some things that might be handled differently by the underlying window manager. Which one are you using ?

          D Offline
          D Offline
          DRoscoe
          wrote on last edited by DRoscoe
          #4

          @SGaist KDE. I also tested it with LXDE with the same results

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Ok, are you using the distribution provided Qt ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • D DRoscoe

              I have a modal dialog box which behaves differently on Windows than on Linux. When the modal comes up on Windows, it prevents me from interacting in any way with the application window, including moving it around. I believe this to be the correct behavior. On linux, however, the controls are disabled, but I can still click and drag the main application window around.

              Is there any way to make this stop?

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by
              #6

              @DRoscoe said in Different modal behavior:

              Is there any way to make this stop?

              I really doubt it, as this is what the window manager job is. Probably the WM isn't respecting some hint, or it's just the way it operates on Linux/Windows. Have you tried explicitly disabling the system buttons for the dialog? e.g. passing Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint on construction?

              Read and abide by the Qt Code of Conduct

              D 1 Reply Last reply
              0
              • kshegunovK kshegunov

                @DRoscoe said in Different modal behavior:

                Is there any way to make this stop?

                I really doubt it, as this is what the window manager job is. Probably the WM isn't respecting some hint, or it's just the way it operates on Linux/Windows. Have you tried explicitly disabling the system buttons for the dialog? e.g. passing Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint on construction?

                D Offline
                D Offline
                DRoscoe
                wrote on last edited by
                #7

                @kshegunov thanks. I tried using X11BypassWindowManagerHint. Not only did that not work, but it also broke other aspects of the window.

                It's not a huge problem. I was just going to a common behavior across all platforms.

                @SGaist Thank you as well.

                kshegunovK 1 Reply Last reply
                0
                • SGaistS SGaist

                  Ok, are you using the distribution provided Qt ?

                  D Offline
                  D Offline
                  DRoscoe
                  wrote on last edited by
                  #8

                  @SGaist No. Centos comes with an old Qt distribution. I had to update it to 5.4

                  1 Reply Last reply
                  0
                  • D DRoscoe

                    @kshegunov thanks. I tried using X11BypassWindowManagerHint. Not only did that not work, but it also broke other aspects of the window.

                    It's not a huge problem. I was just going to a common behavior across all platforms.

                    @SGaist Thank you as well.

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #9

                    But why bypass the system hints, this breaks all kinds of stuff? Just pass yours, at least that's what I'd usually do to disable the dialog box system menu (which should work fine on KDE, not so sure about Gnome).

                    Read and abide by the Qt Code of Conduct

                    D 1 Reply Last reply
                    0
                    • kshegunovK kshegunov

                      But why bypass the system hints, this breaks all kinds of stuff? Just pass yours, at least that's what I'd usually do to disable the dialog box system menu (which should work fine on KDE, not so sure about Gnome).

                      D Offline
                      D Offline
                      DRoscoe
                      wrote on last edited by
                      #10

                      @kshegunov I only tried that hint to see if I could get the behavior I wanted. It didn't work. I reverted to my original implementation which has the behavior I originally reported

                      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