From: konrad Date: Sun, 3 Oct 2010 14:08:19 +0000 (+0000) Subject: make login dialog do what is expected X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=67b5228c5be0efda3ee84f43d714751e0cb08562;p=konrad%2Fsmoke.git make login dialog do what is expected git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@599 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/dialogs/login.cpp b/src/dialogs/login.cpp index 363daa3..b257ac8 100644 --- a/src/dialogs/login.cpp +++ b/src/dialogs/login.cpp @@ -32,6 +32,7 @@ MLogin::MLogin() { setWindowTitle(tr("Magic Smoke Login")); + setWindowFlags(windowFlags()|Qt::Window); QVBoxLayout*vl; setLayout(vl=new QVBoxLayout); //create Menu Bar @@ -70,6 +71,11 @@ MLogin::MLogin() connect(p,SIGNAL(clicked()),this,SLOT(startLogin())); initProfiles(); loadProfile(); + + QAction *act=new QAction(this); + act->setShortcut(Qt::Key_Escape); + connect(act,SIGNAL(triggered(bool)),this,SLOT(close())); + addAction(act); } void MLogin::initProfiles() diff --git a/src/dialogs/login.h b/src/dialogs/login.h index 53c328e..1ea2b3c 100644 --- a/src/dialogs/login.h +++ b/src/dialogs/login.h @@ -13,13 +13,13 @@ #ifndef MAGICSMOKE_LOGIN_H #define MAGICSMOKE_LOGIN_H -#include +#include class QComboBox; class QLineEdit; /**login and profile configuration window*/ -class MLogin:public QDialog +class MLogin:public QWidget { Q_OBJECT public: