PDA

View Full Version : QItemSelectionModel and selectionChanged / currentChanged.



hickscorp
22nd April 2011, 09:39
Hello guys :)

i have a QTableView driven by a QSqlTableModel. i have connected my table view selection model via currentChanged signal (Also tried selectionChanged), so i have "contextual" buttons which are available or not wether a selection is made in the table.

However, here is the behavior i have:
- If i click an item, the slot get called.
- If i use Ctrl + click to deselect this very same item, the slot is not called.
- If i use Ctrl + A to select all, the slot is never called neither.

How can i get notified of any kind of "item highlight" event via slots / signals?

i'm using Qt 4.7.2 OpenSource.
Tanks a lot,
Pierre.

hickscorp
29th April 2011, 22:40
Bump. Anyone please?