[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Show count of selectedRows() in real time (PyQt5)
From: Maurizio Berti <maurizio.berti () gmail ! com>
Date: 2022-10-25 22:57:59
Message-ID: CAPn+-XRfp2vbOwpfSC5GJD6fux0Vy2N=CdbuNUAhcJADVC0GwQ () mail ! gmail ! com
[Download RAW message or body]
Why don't you connect to the selectionChanged signal of the selection model?
https://doc.qt.io/qt-5/qitemselectionmodel.html#selectionChanged
Il giorno mar 25 ott 2022 alle ore 22:35 G Connor <neothreeeight@hotmail.com>
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
http://www.jidesk.net
[Attachment #3 (text/html)]
<div dir="ltr"><div>Why don't you connect to the selectionChanged signal of the \
selection model?</div><div><br></div><div><a \
href="https://doc.qt.io/qt-5/qitemselectionmodel.html#selectionChanged">https://doc.qt.io/qt-5/qitemselectionmodel.html#selectionChanged</a></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 25 ott 2022 alle \
ore 22:35 G Connor <<a \
href="mailto:neothreeeight@hotmail.com">neothreeeight@hotmail.com</a>> ha \
scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
class="msg2862010960468494169">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div>I have QTableWidget and QTableView items on my screen. Both have \
SelectionMode set to ExtendedSelection.</div> <div><br>
</div>
<div>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).</div> <div><br>
</div>
<div>Thanks</div>
<br>
</div>
</div>
</div></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" \
class="gmail_signature">È difficile avere una convinzione precisa quando si parla \
delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a \
href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic