Commit e8c64073 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed list widget stealing focus from login widget.

parent 53a3fc22
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QFileDialog> #include <QFileDialog>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QHeaderView>
#include <QInputDialog> #include <QInputDialog>
#include <QKeyEvent> #include <QKeyEvent>
#include <QMenu> #include <QMenu>
...@@ -265,6 +266,8 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title, ...@@ -265,6 +266,8 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
name_p += textsize; name_p += textsize;
} }
list->header()->hide();
connect(list, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, connect(list, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this,
SLOT(list_row_activated_cb(QTreeWidgetItem*, int))); SLOT(list_row_activated_cb(QTreeWidgetItem*, int)));
...@@ -273,11 +276,11 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title, ...@@ -273,11 +276,11 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
setLayout(vbox); setLayout(vbox);
setFixedSize(200, 400);
setWindowTitle(translate_utf8(title)); setWindowTitle(translate_utf8(title));
debug_print("Created a CoWowListWidgetQt\n"); setAttribute(Qt::WA_ShowWithoutActivating);
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
list->resizeColumnToContents(0);
show(); show();
list->setFocus(); list->setFocus();
...@@ -291,7 +294,6 @@ void CoWowListWidgetQt::focusInEvent(QFocusEvent* event) ...@@ -291,7 +294,6 @@ void CoWowListWidgetQt::focusInEvent(QFocusEvent* event)
void CoWowListWidgetQt::closeEvent(QCloseEvent* event) void CoWowListWidgetQt::closeEvent(QCloseEvent* event)
{ {
debug_print("CoWowListWidgetQt::closeEvent\n");
QWidget::closeEvent(event); QWidget::closeEvent(event);
list_cancel_cb(); list_cancel_cb();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment