use currentItemChanged signal instead of itemSelectionChanged - since the latter is always one item behind if you hold down the mousebutton and move the cursor through the list
authorsheepluva
Tue, 27 Sep 2011 16:26:57 +0200
changeset 6054 d3751a18cecb
parent 6052 5e3e7d19bdb5
child 6056 a60e603ef8ef
use currentItemChanged signal instead of itemSelectionChanged - since the latter is always one item behind if you hold down the mousebutton and move the cursor through the list
QTfrontend/pagetraining.cpp
--- a/QTfrontend/pagetraining.cpp	Tue Sep 27 16:14:35 2011 +0200
+++ b/QTfrontend/pagetraining.cpp	Tue Sep 27 16:26:57 2011 +0200
@@ -96,8 +96,9 @@
 
 void PageTraining::connectSignals()
 {
-    connect(lstMissions, SIGNAL(itemSelectionChanged()), this, SLOT(updateInfo()));
-    connect(lstMissions, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(startSelected()));
+    connect(lstMissions, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstMissions, SIGNAL(clicked()), this, SLOT(updateInfo()));
+    connect(lstMissions, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(startSelected()));
     connect(btnPreview, SIGNAL(clicked()), this, SLOT(startSelected()));
     connect(btnStart, SIGNAL(clicked()), this, SLOT(startSelected()));
 }