[PyQt] Synchronized scrolling between two tables
Nader Abedrabbo
aenader1 at yahoo.com
Wed Nov 2 13:23:36 GMT 2011
Thanks Wolfgang and Scott.
Wolfgang, Initially I had wanted to use one table. But I couldn't figure
out how to disable certain columns. My data goes in the first three
columns, then the calculation results are populated in the next 5 columns.
I don't want the user to be able to edit/select the calculated 5 columns.
That is why I implemented two adjacent tables.
If their is a way to disable certain columns in a table from being selected,
I would appreciate if you can guide me to it.
Thanks again!
Bugzilla from wolfgang at rohdewald.de wrote:
>
> Am Dienstag, 1. November 2011, 14:02:48 schrieb Nader Abedrabbo:
>> What I would like though is a synchronized scrolling of the two tables,
>> i.e.
>> if I scroll the first table, then the second table should scroll to the
>> same view (same row level) as the first table.
>>
>> Is that possible?
>
> yes. Have a look at classes ScoreViewLeft, ScoreViewRight and ScoreTable
> in kajongg
> http://websvn.kde.org/trunk/KDE/kdegames/kajongg/src/scoring.py?view=markup
>
> but I do not see the need for two tables in your case, I would try to use
> one
> single QTableView. Initialize the calculated fields to empty and after
> having
> calculated them, refresh the view.
>
> you do not even need a calculate button. If your calculation really needs
> some
> time, you can put the calculation into a separate thread and
> automatically
> update the view when a field has been calculcated.
>
> --
> Wolfgang
>
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
--
View this message in context: http://old.nabble.com/Synchronized-scrolling-between-two-tables-tp32761709p32765646.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list