[PyQt] pyqt4 4.11.3 with Qt4.8.6, QTableView, header click, sorting

MM finjulhich at gmail.com
Sun Jul 26 00:52:21 BST 2015


On 23 July 2015 at 20:12, MM <finjulhich at gmail.com> wrote:

> Hello,
>
> I am trying to use new style signal/slot to connect
> QTableView.horizontalHeader().sectionClicked signal to
> QTableView.sortByColumns
>
> this is the code:
>
> self.tableView.horizontalHeader().sectionClicked.\
>       connect(self.tableView.sortByColumn)
>
> The little triangle appears in the header columns when I click, by sorting
> does not happen.
> I did do:  self.tableView.setSortingEnabled(True) _before_.
>
> 1. Can I use new style connect with the versions I have?
> 2. If yes, how can I express the section number, the int argument, to be
> passed from sectionClicked to sortByColumn.
>
> MM
>

Is it advised to use newer versions of PyQt?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150726/be77d3bb/attachment.html>


More information about the PyQt mailing list