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. add icon on task bar on linux platform
Forum Updated to NodeBB v4.3 + New Features

add icon on task bar on linux platform

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 924 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.
  • C Offline
    C Offline
    chris_rookie
    wrote on last edited by
    #1

    i wanna add a customize icon on my applicaion's task bar.
    but, on linux platform, the method setWindowsIcons does not make sense.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @chris_rookie said in add icon on task bar on linux platform:

      the method setWindowsIcons does not make sense

      What does this mean? Doesn't work? You won't use it, or something else? Please show us some code.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 1 Reply Last reply
      0
      • C Offline
        C Offline
        chris_rookie
        wrote on last edited by
        #3

        ![alt text](0a1f8548-c4e5-4489-a7ae-124fadffa3b0-image.png image url)

        i did like this, on linux platform, but it display as this。it's gnome desktop
        ![alt text](612cd34a-531f-4b88-bdd7-412162f82efb-image.png image url)

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chris_rookie
          wrote on last edited by
          #4

          the second image is task bar
          5ba46656-3011-4dd4-85e9-9894b1780d19-image.png

          1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            @chris_rookie said in add icon on task bar on linux platform:

            the method setWindowsIcons does not make sense

            What does this mean? Doesn't work? You won't use it, or something else? Please show us some code.

            C Offline
            C Offline
            chris_rookie
            wrote on last edited by
            #5

            @Christian-Ehrlicher
            Hi,
            I have post three pictures to show how I did it. Is there some useful infomation in it?

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              Do you really set the icon for the main window?
              /edit: and are you sure the image is found when you run your executable?

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              C 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                Do you really set the icon for the main window?
                /edit: and are you sure the image is found when you run your executable?

                C Offline
                C Offline
                chris_rookie
                wrote on last edited by
                #7

                @Christian-Ehrlicher

                MainWindow::MainWindow(QWidget *parent) :
                QMainWindow(parent),
                ui(new Ui::MainWindow)
                {

                ui->setupUi(this);
                setWindowIcon(QIcon(":/image/logo.ico"));
                ui->tabWidget->setTabPosition(QTabWidget::West);
                ui->tabWidget->tabBar()->setStyle(new CustomTabStyle);
                

                }

                I did like this, it works.
                before, I set this in Ui form,that's wrong.

                Thank you.

                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