Results 1 to 3 of 3

Thread: QTableWidget formatting question

  1. #1
    Join Date
    Apr 2011
    Posts
    12
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidget formatting question

    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?

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget formatting question

    I think style sheets for QTableWidgetItem might help. Or there is one more option - to set a different background color for the output values.
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    Apr 2011
    Posts
    12
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidget formatting question

    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.

Similar Threads

  1. QTableWidget sorting question
    By tommy in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2009, 13:02
  2. Question on QTableWidget
    By impeteperry in forum Qt Programming
    Replies: 3
    Last Post: 2nd June 2009, 03:33
  3. QTableWidget signal/slot question
    By twells55555 in forum Qt Programming
    Replies: 8
    Last Post: 6th August 2007, 21:58
  4. QTableWidget question
    By larry104 in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2006, 21:46
  5. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 18:46

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.