PDA

View Full Version : QTableWidget formatting question



orfner
5th October 2011, 19:36
I need to show the user both input and output values for a table, including an index number.

For example:

Index----------------Input X--------------Input Y-------------Output X-----------Output Y
----0--------------------42--------------------76--------------------7--------------------54
----1--------------------55--------------------24--------------------3---------------------2
----2--------------------56--------------------65--------------------6--------------------77
----3--------------------1---------------------45--------------------1---------------------5
----4--------------------3----------------------7--------------------4---------------------9



To make it more readable I would like to put either a double line or a thicker line between the "Input Y" and "Output X" columns.
Is there a way to do this?

lyuts
6th October 2011, 07:16
I think style sheets for QTableWidgetItem might help. Or there is one more option - to set a different background color for the output values.

orfner
6th October 2011, 19:15
I ended up using two tables, disabling the scroll bar on one and linking both scroll bars together (so the rows would always line up). I may switch to the different colors thing though, depending on how they both look.