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. Child Window in taskbar
QtWS25 Last Chance

Child Window in taskbar

Scheduled Pinned Locked Moved Unsolved General and Desktop
windowtaskbarchild
10 Posts 4 Posters 6.2k 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.
  • A Offline
    A Offline
    ars1614
    wrote on last edited by
    #1

    Hi, I would like, if it is possible, to show child windows in the windows task bar.

    Now when I am opening new windows, they don't appear on the taskbar, they don't have any thumbnail... I would like to choose between all my open windows on mouseover over the application taskbar icon.

    Thanks!

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Radek
      wrote on last edited by
      #2

      Hi,
      Just a quick input.
      I recon these are modal windows.
      Try passing 0 (zero) as parent when you create them.
      If this doesn't work, show your code where you create a window ;-)

      Cheers.

      There is no problem, there are only solutions. :)

      A S 2 Replies Last reply
      1
      • R Radek

        Hi,
        Just a quick input.
        I recon these are modal windows.
        Try passing 0 (zero) as parent when you create them.
        If this doesn't work, show your code where you create a window ;-)

        Cheers.

        A Offline
        A Offline
        ars1614
        wrote on last edited by
        #3

        @Radek Thanks for answering.
        I just probe it and it works. The problem now is that when I close the parent, they aren't closed automatically :/.
        I am creating the windows dynamically:

        ...
           var component = Qt.createComponent("MyStyledWindow.qml");
           if (component.status === Component.Ready) {
           var dialog = component.createObject(0, { title: "My Window", properties: theProperty ...});
           dialog.show();
        }
        

        In the closing event of my window, I am killing the object itself because I am executing a webview inside the new window and I want it to finish.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Radek
          wrote on last edited by Radek
          #4

          Hmm I haven't played with QtQuick yet so I don't if/how you can do that. Sry I'm limited here :/
          Could you store the "dialog" variable somewhere where you could also kill it when closing your main window?

          There is no problem, there are only solutions. :)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ars1614
            wrote on last edited by
            #5

            That is the problem. Right now, I am not taking care of that, I am just setting the parent, and it does automatically everything.
            I cannot believe there is no other way to get the thumbnail for a window...

            Yes, I can implement it and when parent gets close, close the window... But... (you know...)

            (Although I could write the component and set the parent to zero (don't know if that'd work), but I do need to create dynamically the object because the webpage connects to a webserver and I don't want the webPage to be connected every time)

            1 Reply Last reply
            0
            • A Offline
              A Offline
              ars1614
              wrote on last edited by
              #6

              For now I am storing as you said but see what happened to me...
              I was creating the windows inside an item. Item does not have closing event. I was writing the destruction inside the onDestruction of the item. As there still was a window open in the application, when you closed the main window, the application did not close... So I had to refer to the main window and connect its closing signal to one function inside my item into the Component.onComplete to destroy the windows... Too much work for today only for showing a thumbnail :(

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

                Hi
                I dont know QML but in c++ its possible to use
                http://doc.qt.io/qt-4.8/qapplication.html#topLevelWidgets
                to close such parent less windows in an easy manner.
                (compared to storing the pointer)

                A 1 Reply Last reply
                1
                • mrjjM mrjj

                  Hi
                  I dont know QML but in c++ its possible to use
                  http://doc.qt.io/qt-4.8/qapplication.html#topLevelWidgets
                  to close such parent less windows in an easy manner.
                  (compared to storing the pointer)

                  A Offline
                  A Offline
                  ars1614
                  wrote on last edited by
                  #8

                  @mrjj I need to do it in qml because it is from there where I am launching the windows.
                  What surprised me was qml Window does not have a property to show the taskicon... In the end, it is a window! Nor a pop-up neither dialog...

                  mrjjM 1 Reply Last reply
                  0
                  • A ars1614

                    @mrjj I need to do it in qml because it is from there where I am launching the windows.
                    What surprised me was qml Window does not have a property to show the taskicon... In the end, it is a window! Nor a pop-up neither dialog...

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

                    @ars1614

                    Well i think the rule is that only top level windows are shown.
                    If a window has a parent,its not top level.
                    Some of it maybe due to the platform etc.
                    But is a flag if possible would be very nice :)

                    1 Reply Last reply
                    1
                    • R Radek

                      Hi,
                      Just a quick input.
                      I recon these are modal windows.
                      Try passing 0 (zero) as parent when you create them.
                      If this doesn't work, show your code where you create a window ;-)

                      Cheers.

                      S Offline
                      S Offline
                      Shahroozleon
                      wrote on last edited by
                      #10

                      @Radek Thank you very much Radek you helped me so much.
                      even 4 years after your answer.

                      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