qt - QSystemTrayIcon DoubleClick Activation results in two Trigger events -


i'm developing application, have system tray icon. i'm trying catch qsystemtrayicon::doubleclick in system tray. reason not understand, have been unable catch. in stead, 2 qsystemtrayicon::trigger events. have tried using both qt4 (v4.8.7) , qt5 (v5.5.1). platform kde/plasma 5(v5.4.3), on debian testing. have tested on lxde available on debian testing.

so question here is: bug in qt or other issue else where?

/* header file */  class mytrayicon : public qsystemtrayicon {     q_object      public :         nbtrayicon();      public slots:         void handleactivation( qsystemtrayicon::activationreason reason );      private slots:         void togglevisible();         void showinfo();         void quit();      q_signals:         void newwindow(); };  /* cpp file */  mytrayicon::mytrayicon() : qsystemtrayicon() {      seticon( qicon( ":/icons/newbreeze.png" ) );     connect( this, signal( activated( qsystemtrayicon::activationreason ) ), this, slot( handleactivation( qsystemtrayicon::activationreason ) ) );      qmenu *menu = new qmenu( "traymenu" );     menu->addaction( "&toggle visible windows", this, slot( togglevisible() ) );     menu->addaction( qicon::fromtheme( "application-exit", qicon( ":/icons/delete.png" ) ), "&quit newbreeze", this, slot( quit() ) );     setcontextmenu( menu ); };  void mytrayicon::handleactivation( qsystemtrayicon::activationreason reason ) {      qdebug() << reason;      switch( reason ) {         case mytrayicon::context: {             qdebug() << "context";             break;         };          case mytrayicon::middleclick: {             qdebug() << "middle click";             break;         };          case mytrayicon::trigger: {             qdebug() << "trigger";             break;         }          case mytrayicon::doubleclick: {             qdebug() << "doubleclick";             break;         };          default:{             qdebug() << reason;             break;         };     }; }; 

ps: have added code listed above.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -