summaryrefslogtreecommitdiffstats
path: root/src/client/connectwindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/connectwindow')
-rw-r--r--src/client/connectwindow/connectwindow.cpp11
-rw-r--r--src/client/connectwindow/connectwindow.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp
index b84f22c..8631b43 100644
--- a/src/client/connectwindow/connectwindow.cpp
+++ b/src/client/connectwindow/connectwindow.cpp
@@ -32,7 +32,7 @@ ConnectWindow::ConnectWindow(QWidget *parent) : QWidget(parent)
_ui->setupUi(this);
// Set window properties
- setWindowFlags(Qt::WindowStaysOnTopHint);
+ setWindowFlags(Qt::WindowStaysOnTopHint | Qt::Tool);
// Set page 0 as default
_ui->stackedWidget->setCurrentIndex(0);
@@ -142,12 +142,21 @@ void ConnectWindow::closeEvent(QCloseEvent *e)
this->hide();
}
+void ConnectWindow::doShow()
+{
+ show();
+ activateWindow();
+ raise();
+}
+
/***************************************************************************//**
* Gives the keyboard input focus to the input line.
* @param event
*/
void ConnectWindow::showEvent(QShowEvent* event)
{
+ activateWindow();
+ raise();
_ui->lineEditName->setFocus();
}
diff --git a/src/client/connectwindow/connectwindow.h b/src/client/connectwindow/connectwindow.h
index ab59e00..7cf52c3 100644
--- a/src/client/connectwindow/connectwindow.h
+++ b/src/client/connectwindow/connectwindow.h
@@ -75,6 +75,7 @@ protected:
void showEvent(QShowEvent* event);
protected slots:
+ void doShow();
void onBtnConnection();
void onBtnHide();