diff options
author | vng <viktor.govako@gmail.com> | 2012-12-22 03:07:38 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:58:04 +0300 |
commit | 300ce68b5738d4237dee91963fff7157c68af26c (patch) | |
tree | a9b6d61fecf6adb5cd2e302034033971bcb1bec5 /qt/search_panel.cpp | |
parent | f76801b5dc9cabfd245003479a3aa759464e7a07 (diff) |
Migrating to QT5.
Diffstat (limited to 'qt/search_panel.cpp')
-rw-r--r-- | qt/search_panel.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 84d5acbc1f..3c1e6bf5c7 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -7,14 +7,15 @@ #include <QtCore/QTimer> -#include <QtGui/QHeaderView> -#include <QtGui/QTableWidget> -#include <QtGui/QLineEdit> -#include <QtGui/QVBoxLayout> -#include <QtGui/QHBoxLayout> -#include <QtGui/QPushButton> #include <QtGui/QBitmap> +#include <QtWidgets/QHeaderView> +#include <QtWidgets/QTableWidget> +#include <QtWidgets/QLineEdit> +#include <QtWidgets/QVBoxLayout> +#include <QtWidgets/QHBoxLayout> +#include <QtWidgets/QPushButton> + namespace qt { @@ -33,7 +34,7 @@ SearchPanel::SearchPanel(DrawWidget * drawWidget, QWidget * parent) m_pTable->setSelectionBehavior(QAbstractItemView::SelectRows); m_pTable->verticalHeader()->setVisible(false); m_pTable->horizontalHeader()->setVisible(false); - m_pTable->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); + m_pTable->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); connect(m_pTable, SIGNAL(cellClicked(int, int)), this, SLOT(OnSearchPanelItemClicked(int,int))); m_pClearButton = new QPushButton(this); @@ -55,8 +56,9 @@ SearchPanel::SearchPanel(DrawWidget * drawWidget, QWidget * parent) CHECK(connect(this, SIGNAL(SearchResultSignal(ResultsT *)), this, SLOT(OnSearchResult(ResultsT *)), Qt::QueuedConnection), ()); - setFocusPolicy(Qt::StrongFocus); - setFocusProxy(m_pEditor); + /// @todo THis is not working on Qt5. QLineEdit doesn't get any input. + //setFocusPolicy(Qt::StrongFocus); + //setFocusProxy(m_pEditor); m_params.m_callback = bind(&SearchPanel::SearchResultThreadFunc, this, _1); } |