Show count of selectedRows() in real time (PyQt5)

Maurizio Berti maurizio.berti at
Tue Oct 25 23:57:59 BST 2022

Why don't you connect to the selectionChanged signal of the selection model?

Il giorno mar 25 ott 2022 alle ore 22:35 G Connor <neothreeeight at>
ha scritto:

> I have  QTableWidget and QTableView items on my screen.  Both have
> SelectionMode set to ExtendedSelection.
> tbl.selectionModel().selectedRows() will give me the count after the rows
> are selected, but I want to captured/show that count in real-time, as I’m
> dragging the mouse or using the keyboard (which is done with shift to
> anchor and then the up/down key).
> Thanks

È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list