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. QDialog setWindowFlags(Qt::Tool) Dialog is not Active
Forum Updated to NodeBB v4.3 + New Features

QDialog setWindowFlags(Qt::Tool) Dialog is not Active

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 2 Posters 4.6k Views 1 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.
  • Taz742T Offline
    Taz742T Offline
    Taz742
    wrote on last edited by Taz742
    #1

    when i setWindowFlags(Qt::Tool) in my dialog, while not click on the dialog it is not active. Any idea?

    Do what you want.

    1 Reply Last reply
    0
    • mrjjM mrjj

      @Taz742

      I didnt test it, you you could try
      in ShowEvent (in contacts) to all QApplication::setActiveWindow(this)

      Taz742T Offline
      Taz742T Offline
      Taz742
      wrote on last edited by
      #11

      @mrjj

      dlgChooseContacts *dlgChoose = new dlgChooseContacts(last dialog) // set parent and it is hidden of taskbar
      dlgChoose.exec();
      

      its also work.

      Do what you want.

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

        Hi
        What you mean?
        If you set setWindowFlags(Qt::Tool,true) and dialog is not the active window, it wont change to
        tool style?

        Taz742T 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          What you mean?
          If you set setWindowFlags(Qt::Tool,true) and dialog is not the active window, it wont change to
          tool style?

          Taz742T Offline
          Taz742T Offline
          Taz742
          wrote on last edited by Taz742
          #3

          @mrjj
          Choose Contacts is a last dialog and it is not active (i have setWindowFlags(Qt::Tool)).
          alt text

          @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

          setWindowFlags(Qt::Tool,true)

          true ? no.. i have just setWindowFlags(Qt::Tool);

          Do what you want.

          mrjjM 1 Reply Last reply
          0
          • Taz742T Taz742

            @mrjj
            Choose Contacts is a last dialog and it is not active (i have setWindowFlags(Qt::Tool)).
            alt text

            @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

            setWindowFlags(Qt::Tool,true)

            true ? no.. i have just setWindowFlags(Qt::Tool);

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

            @Taz742
            sorry my bad. its not with S in the end
            setWindowFlag( key, true/false );

            Active ?
            as in you cant click on anything in it or in what way not active?

            Note then you set with
            setWindowFlags(Qt::Tool)).
            you kill all other flags and only Qt::Tool remains.

            or do you mean active as i when you call
            activateWindow() on it ?

            Taz742T 1 Reply Last reply
            0
            • mrjjM mrjj

              @Taz742
              sorry my bad. its not with S in the end
              setWindowFlag( key, true/false );

              Active ?
              as in you cant click on anything in it or in what way not active?

              Note then you set with
              setWindowFlags(Qt::Tool)).
              you kill all other flags and only Qt::Tool remains.

              or do you mean active as i when you call
              activateWindow() on it ?

              Taz742T Offline
              Taz742T Offline
              Taz742
              wrote on last edited by
              #5

              @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

              Active ?
              as in you cant click on anything in it or in what way not active?

              I'm sorry I said badly.
              No, I can click on dialog.
              It does not appear on the picture but on the lineEdit ("ძებნა..."), i have a focus but before you do not click a dialog I can not write anything before.

              Do what you want.

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

                Hi
                Ah, more coffee helped. :)

                That is normal for Tool windows in windows OS.
                It will not be make it self current when you show it.
                Its by design on that platform.
                (also on linux it seems)

                Taz742T 1 Reply Last reply
                0
                • mrjjM mrjj

                  Hi
                  Ah, more coffee helped. :)

                  That is normal for Tool windows in windows OS.
                  It will not be make it self current when you show it.
                  Its by design on that platform.
                  (also on linux it seems)

                  Taz742T Offline
                  Taz742T Offline
                  Taz742
                  wrote on last edited by Taz742
                  #7

                  @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

                  That is normal for Tool windows in windows OS.
                  It will not be make it self current when you show it.
                  Its by design on that platform.

                  It's bad for me :(

                  At the end of the picture you can see a small two form. MainWindow and tazi jazi. Choos Contacts is not visible because I wanted to do it. For this I used the Qt :: Tool. Can we achieve this in a different way? So that the form remains active?

                  Do what you want.

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

                    Yes, on windows you can call
                    ( in main, or where u do call show for the window)
                    w.show();
                    QApplication::setActiveWindow(&w);

                    That so far have worked on windows. Some linux window managers might ignore
                    it.

                    Taz742T 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      Yes, on windows you can call
                      ( in main, or where u do call show for the window)
                      w.show();
                      QApplication::setActiveWindow(&w);

                      That so far have worked on windows. Some linux window managers might ignore
                      it.

                      Taz742T Offline
                      Taz742T Offline
                      Taz742
                      wrote on last edited by Taz742
                      #9

                      @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

                      w.show();
                      QApplication::setActiveWindow(&w);

                      Yes it work if i use w.show(); but 'Choose Contacts' is Dialog and i deppend w.exec() == QDialog::Accepted or no.

                      Do what you want.

                      mrjjM 1 Reply Last reply
                      0
                      • Taz742T Taz742

                        @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

                        w.show();
                        QApplication::setActiveWindow(&w);

                        Yes it work if i use w.show(); but 'Choose Contacts' is Dialog and i deppend w.exec() == QDialog::Accepted or no.

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

                        @Taz742

                        I didnt test it, you you could try
                        in ShowEvent (in contacts) to all QApplication::setActiveWindow(this)

                        Taz742T 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @Taz742

                          I didnt test it, you you could try
                          in ShowEvent (in contacts) to all QApplication::setActiveWindow(this)

                          Taz742T Offline
                          Taz742T Offline
                          Taz742
                          wrote on last edited by
                          #11

                          @mrjj

                          dlgChooseContacts *dlgChoose = new dlgChooseContacts(last dialog) // set parent and it is hidden of taskbar
                          dlgChoose.exec();
                          

                          its also work.

                          Do what you want.

                          mrjjM 1 Reply Last reply
                          0
                          • Taz742T Taz742

                            @mrjj

                            dlgChooseContacts *dlgChoose = new dlgChooseContacts(last dialog) // set parent and it is hidden of taskbar
                            dlgChoose.exec();
                            

                            its also work.

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

                            @Taz742
                            Ok so even its a tool window, it becomes active on show if you assign parent?

                            Taz742T 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              @Taz742
                              Ok so even its a tool window, it becomes active on show if you assign parent?

                              Taz742T Offline
                              Taz742T Offline
                              Taz742
                              wrote on last edited by
                              #13

                              @mrjj said in QDialog setWindowFlags(Qt::Tool) Dialog is not Active:

                              it becomes active on show if you assign parent

                              Yes.
                              I do not need any tool Window. I wanted to just hide the taskbar.

                              Do what you want.

                              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