Score:1

QSystemTrayIcon disappears on Ubuntu 20.04/22.04 after reboot

py flag

My Qt Application shows the QSystemTrayIcon on fresh install but after reboot or logout/login I see the QSystemTrayIcon disappears from UI on startup.

I am seeing this issue on 20.04 and 22.04. 18.04 works no issues.

My implementation is straightforward. This function is called on initialization:

// Create tray and setup tray icon
void MyApp::createTrayIcon()
{
    QString trayNotConn = TRAY_IMG;

    m_pTrayIconMenu = new QMenu(this);
    m_pTrayImage    = new QPixmap(trayNotConn);
    m_pTrayIcon     = new QSystemTrayIcon(this);

    QIcon icon(*m_pTrayImage);
    m_pTrayIcon->setIcon(icon);
    setWindowIcon(icon);
    m_pTrayIcon->show();

    connect(m_pTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
               this,     SLOT(onActivated(QSystemTrayIcon::ActivationReason)));
}

I'm aware that Gnome has stopped supporting system tray icons and I'm using Top Icons Extension on 20.04. I still see the issue on reboot inspite of this.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.