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

The tray displays activated signals on ubuntu, without Context and DoubleClick signals

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.12.0, 5.12.4
    • GUI: Workspace
    • None
    • Linux/X11

    Description

      I tried left, right, double, middle, but the terminal output was only reason = 3 or reason = 4,not found  reason = 1 or reason = 2

      connect(sysTray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(system_tray_clicked(QSystemTrayIcon::ActivationReason)));
      
      void MainWindow::system_tray_clicked(QSystemTrayIcon::ActivationReason reason)
      {
          qDebug() << "reason = " << reason << endl;
          switch (reason)
          {
              case QSystemTrayIcon::Trigger:
              case QSystemTrayIcon::DoubleClick:
                  if ( this->isHidden() || this->windowState() == Qt::WindowMinimized)
                  {
                      if (this->windowState() == Qt::WindowMinimized)
                          this->hide();
                      this->showNormal();
                  }
                  else
                  {
                      this->hide();
                  }
                  break;
              default:
                  break;
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            leisureg leisureg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes