Qt4 - Enter key does always close() a dialog. Correction of a virtual keyword missing.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 1 Apr 2007 23:16:59 +0000 (23:16 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 1 Apr 2007 23:16:59 +0000 (23:16 +0000)
modules/gui/qt4/util/qvlcframe.hpp

index 82f9134..de2cc6e 100644 (file)
@@ -135,7 +135,11 @@ public:
 protected:
     intf_thread_t *p_intf;
 
-    void cancel()
+    virtual void cancel()
+    {
+        hide();
+    }
+    virtual void close()
     {
         hide();
     }
@@ -145,6 +149,10 @@ protected:
         {
             cancel();
         }
+        else if( keyEvent->key() == Qt::Key_Enter )
+        {
+            close();
+        }
     }
 };