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. Ubuntu - prevent taskbar icon groupding for child windows
Forum Updated to NodeBB v4.3 + New Features

Ubuntu - prevent taskbar icon groupding for child windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 1.4k 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.
  • M Offline
    M Offline
    mfrench
    wrote on last edited by
    #1

    I have a main window (QMainWindow) and several child windows (also QMainWindow) that are initialized on startup and are always around, though invisible at times.

    On my taskbar these always group, showing the dots below the application icon, however I'd like to prevent this taskbar/dock grouping and give each window a unique icon on the taskbar while still keeping them all as children of the main window.

    Is there a way to prevent icon grouping?

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

      Hi
      I think the only way is to disable it in the Os. I don't think Qt can alter this from code on an app pr app basic.

      M 1 Reply Last reply
      0
      • M mfrench

        I have a main window (QMainWindow) and several child windows (also QMainWindow) that are initialized on startup and are always around, though invisible at times.

        On my taskbar these always group, showing the dots below the application icon, however I'd like to prevent this taskbar/dock grouping and give each window a unique icon on the taskbar while still keeping them all as children of the main window.

        Is there a way to prevent icon grouping?

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

        @mfrench said in Ubuntu - prevent taskbar icon groupding for child windows:

        and give each window a unique icon on the taskbar while still keeping them all as children of the main window.

        I hope you can't do that! I don't want your app to be able to cause me to have 10 separate taskbar entries because it has 10 windows open!

        1 Reply Last reply
        1
        • mrjjM mrjj

          Hi
          I think the only way is to disable it in the Os. I don't think Qt can alter this from code on an app pr app basic.

          M Offline
          M Offline
          mfrench
          wrote on last edited by mfrench
          #4

          @mrjj My app is running on Ubuntu 18.04, so I was able to figure out how to have it check if the appropriate .desktop file exists and if not, create and move it there. Unfortunately this has been the only way I've figured out for Ubuntu 18.04 to do this without installing other add-ons. While this accomplishes what I want, it's not exactly in the method I'd prefer and would really like to not have to rely on .desktop files if possible.

          @JonB My app is running on computers internal to my company only so you'll likely never touch it. The people who use my program most are asking to have this option so I'm simply trying to find the best way to give it to them, preferably internally to Qt and not relying on .desktop files like mentioned above in my comment.

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

            Hi
            Good find with the desktop file but unless there is also i an API to call ,
            i think its the best you can get.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              npcfm
              wrote last edited by
              #6

              If anyone comes across this, you can also achieve this by changing X11's WM_CLIENT_MACHINE property of your widget. Gnome will treat this as a different application. You can also see how gnome matches windows to applications here: https://github.com/GNOME/gnome-shell/blob/main/src/shell-window-tracker.c#L388.

              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