[PyQt] Scroll QTableView beyond last column/row

Paul Du Bois dubois at doublefine.com
Wed Aug 28 21:34:27 BST 2013


I do this:

        # somewhere in init
        self._last_vsb_height = None

self.verticalScrollBar().rangeChanged[int,int].connect(self._on_range_changed)

    def _on_range_changed(self, min, max):
        # Try to prevent infinite recursion
        # Count is in rows
        if max != self._last_vsb_height:
            sender = self.verticalScrollBar()
            self._last_vsb_height = max + 20
            sender.setRange(min, self._last_vsb_height)



On Wed, Aug 28, 2013 at 12:28 PM, Mark Mordeca <mark.mordeca at prosensus.ca>wrote:

> Greetings,
>
>
>
> I have a simple QTableView connected to an QAbstractTableModel.  For the
> purposes of my question, let’s assume that these are the most basic you can
> have in order to get a table with data in it.
>
>
>
> Default behaviour is that you can scroll the table so that the last
> column/row becomes visible, but no further.  I would like to be able to
> scroll the table *past* the last row/column, i.e. I want to be able to
> continue to click right on the horizontal scroll bar even though I have
> reached the last column, thereby making the last column continue to shift
> left in the table revealing “empty space” in the TableView.
>
>
>
> I have been unsuccessful in trying to find a way and hoped that someone
> here had a way to do this or a suggestion as to how.
>
>
>
> Thank you,
>
> Mark
>
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130828/ac955e2a/attachment.html>


More information about the PyQt mailing list