Important: Please read the Qt Code of Conduct -

Qt5.3.0 QSystemTrayIcon transparency problem

  • Hi,

    I have a cross-platform application that uses a QSystemTrayIcon.
    On Ubuntu 12.04 with Gnome3 the trayicon's transparency is replaced by a black background. But this only happens with Qt5.3.
    When I build the same code with Qt4.8 the transparency is shown properly.

    @#include "mainwindow.h"
    #include <QMenu>
    #include <QMenuBar>

    static const char* iconFiles[] =

    MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent),



    void MainWindow::setIcon(qState state)
    QIcon icon;

        if (m_pTrayIcon) {


    void MainWindow::createTrayIcon()
    m_pTrayIcon = new QSystemTrayIcon(this);

    Ideas anyone?

  • Hi Wardex,

    I used your code to see the results on Linux Mint 16, however, the icon is transparent using 5.3. Hope this helps narrowing down the problem.

  • Hey I tried it with Qt5.3 on Ubuntu 14.04 and it worked as well

  • Thanks for the effort!

    Then It'll have to be something gnome-install related on my system!

Log in to reply