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. One QWidget in foreground and block other QWidgets
Forum Update on Monday, May 27th 2025

One QWidget in foreground and block other QWidgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 820 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 Offline
    M Offline
    Michelle02283
    wrote on last edited by
    #1

    Hello, in my function many QWidgets were shown, but if one specific oppens, the other should be blocked, so that you cannot do anything in them. Every Button should be blocked.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      How opens?
      Normally you use a modal dialog type of popup and it automatically blocks the
      other buttons when you call exec()

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Michelle02283
        wrote on last edited by
        #3

        I only use a QWidget and open it with show(). Which class can I use for it?

        mrjjM jsulmJ 2 Replies Last reply
        0
        • M Michelle02283

          I only use a QWidget and open it with show(). Which class can I use for it?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Michelle02283
          You can use QDialog.
          and do
          void someClick() {
          Mydialog dia;
          dia.exec();
          }

          1 Reply Last reply
          3
          • M Michelle02283

            I only use a QWidget and open it with show(). Which class can I use for it?

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Michelle02283 You can disable any QWidget using http://doc.qt.io/qt-5/qwidget.html#enabled-prop

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

            1 Reply Last reply
            3

            • Login

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