Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-54162

QSystemTrayIcon with context menu crashes on second show()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Moved
    • P2: Important
    • None
    • 5.6.1
    • QPA: X11/XCB
    • None
    • Arch Linux

    Description

      The following code inside a QMainWindow crashes:

            QSystemTrayIcon* sysTray = new QSystemTrayIcon(this);
            QMenu *trayMenu = new QMenu(this);
            sysTray->setContextMenu(trayMenu);
            sysTray->show();
            sysTray->hide();
            sysTray->show(); // crash here
      

      Stack trace: (sorry, not build from Qt sources)

      1 QWidget::setParent(QWidget *) 0x7ffff76f69d0
      2 ?? 0x7fffec27f1ba
      3 ?? 0x7ffff7a22bed
      4 ?? 0x7ffff7a4159e
      5 QSystemTrayIcon::setVisible(bool) 0x7ffff7a22777
      6 QSystemTrayIcon::show qsystemtrayicon.h 95 0x402ab5
      7 MainWindow::MainWindow main.cpp 19 0x402bad
      8 main main.cpp 27 0x4028cb

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            abika abika
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes