Results 1 to 7 of 7

Thread: Draw on a QTableWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    England
    Posts
    20
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Draw on a QTableWidget

    I'm reletively new to Qt so I'm still learning the best ways to do thing. Quite often I guess there's a simple solution which I don't know about.

    Anyway, I have a QTableWidget which I've set up so that each cell is square. However, I want to delineate blocks of cells to make it clearer. I want blocks of 3x3 cells to have a darker border around them as in the picture attached.

    As far as I can tell, to do this I will have to subclass QTableWidget and reimplement its paintevent() function and draw the lines there. However, if I do this I don't know how to make it draw the table, text, etc as usual. The lines are static and just have to sit atop the table so is there any easier way do do this?

    Many thanks
    Attached Images Attached Images

Similar Threads

  1. want to draw points in QGraphicsScene
    By ntp in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2008, 18:14
  2. QComboBox in QTableWidget : display troubles.
    By Nyphel in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2007, 23:29
  3. QTableWidget issues
    By Djony in forum Qt Programming
    Replies: 42
    Last Post: 19th December 2006, 23:27
  4. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 18:46
  5. Replies: 6
    Last Post: 5th March 2006, 21:05

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
  •  
Qt is a trademark of The Qt Company.