QListWidget, prompt before currentItemChanged signal
-
@jsulm, as far as I can see with a breakpoint on the first line in the select function, no it isn't.
-
-
@SPlatten How should I know?!
You did not even tell us to what signal select() is connected! -
@jsulm , I'm not asking out specifically....looking at the class, its derived from QItemSelectionModel:
https://doc.qt.io/qt-5/qitemselectionmodel.html#signals@SPlatten said in QListWidget, prompt before currentItemChanged signal:
QItemSelectionModel
OK, did not notice this
-
@Christian-Ehrlicher , thank you, I can see that the select slot is getting called, but it appears that it is being called after the currentItemChanged signal, which is wrong isn't it?
-
@Christian-Ehrlicher , thank you, I can see that the select slot is getting called, but it appears that it is being called after the currentItemChanged signal, which is wrong isn't it?
@SPlatten said in QListWidget, prompt before currentItemChanged signal:
which is wrong isn't it?
Why? Is it written down somewhere? And from my pov a cell has to be the current one until the selection can change.
-
@SPlatten said in QListWidget, prompt before currentItemChanged signal:
which is wrong isn't it?
Why? Is it written down somewhere? And from my pov a cell has to be the current one until the selection can change.
@Christian-Ehrlicher , the intention is that when the user tries to make a new selection, an interim step checks that its ok to allow the change, by checking other content using the slot...it can then allow or disallow the selection.
-
@SPlatten said in QListWidget, prompt before currentItemChanged signal:
which is wrong isn't it?
Why? Is it written down somewhere? And from my pov a cell has to be the current one until the selection can change.
@Christian-Ehrlicher , @jsulm , I think I've been going down a rabbit hole in trying to implement this model, when all I actually need to do is move the test for change into the slot and then if I don't want to allow the selection change assign QListWidgetItem* pobjCurrent to QListWidgetItem* pobjPrevious.