Getting Selected Rows Count in QTableWidget - PyQt
<p>In the <code>python</code> <code>plugin</code>, I'm developing, I need to retrieve the number of selected rows in a <code>QTableWidget</code>. I can loop through each row of the <code>QTableWidget</code> and check them whether it is selected or not. Instead, Is there a straightforward way to get the selected rows count of a <code>QTableWidget</code> in <code>PyQt</code>? </p>

<p><strong>Something like:</strong></p>

<blockquote>
  <p>QTableWidget.selectedRowsCount()</p>
</blockquote>