]> Some of my projects - localmylist.git/commitdiff
Disable expanding on double click. Open file instead
authorAPTX <marek321@gmail.com>
Tue, 3 Jul 2012 13:24:20 +0000 (15:24 +0200)
committerAPTX <marek321@gmail.com>
Tue, 3 Jul 2012 13:24:20 +0000 (15:24 +0200)
management-gui/mylistview.cpp

index de59d762aa4b9fd24b9f155e32517be0eec77ccd..8f1f24e8e50b4f5dfd5ffac130bdca2992747bf1 100644 (file)
@@ -14,6 +14,9 @@ MyListView::MyListView(QWidget *parent) :
        setContextMenuPolicy(Qt::CustomContextMenu);
        connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showCustomContextMenu(QPoint)));
 
+       this->setExpandsOnDoubleClick(false);
+       connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SIGNAL(openFileRequested(QModelIndex)));
+
        openAction = new QAction(tr("Open"), this);
        connect(openAction, SIGNAL(triggered()), this, SLOT(requestOpenFile()));
        openNextAction = new QAction(tr("Open Next"), this);