Hmmm, for single-click we need to connec to QTreeView::activated
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QRadialGradient>
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
#include <KDE/KGlobalSettings>
|
||||
#endif
|
||||
|
||||
static QPainterPath buildPath(const QRectF &r, double radius)
|
||||
{
|
||||
@@ -327,7 +330,11 @@ void ItemView::init(QAction *a1, QAction *a2)
|
||||
connect(listSearch, SIGNAL(returnPressed()), this, SIGNAL(searchItems()));
|
||||
connect(listSearch, SIGNAL(textChanged(const QString)), this, SIGNAL(searchItems()));
|
||||
connect(treeView, SIGNAL(itemsSelected(bool)), this, SIGNAL(itemsSelected(bool)));
|
||||
// connect(treeView, SIGNAL(activated(const QModelIndex &)), this, SLOT(itemActivated(const QModelIndex &)));
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
if (KGlobalSettings::singleClick()) {
|
||||
connect(treeView, SIGNAL(activated(const QModelIndex &)), this, SLOT(itemActivated(const QModelIndex &)));
|
||||
}
|
||||
#endif
|
||||
connect(treeView, SIGNAL(doubleClicked(const QModelIndex &)), this, SIGNAL(doubleClicked(const QModelIndex &)));
|
||||
connect(treeView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(itemClicked(const QModelIndex &)));
|
||||
connect(listView, SIGNAL(itemsSelected(bool)), this, SIGNAL(itemsSelected(bool)));
|
||||
|
||||
Reference in New Issue
Block a user