Results 1 to 3 of 3

Thread: QTableWidget, row offset

  1. #1
    Join Date
    May 2006
    Location
    Australia
    Posts
    53
    Thanks
    11
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTableWidget, row offset

    I want to get a table which has every 2nd row and a half cell width offset to give my buttons a kind of hexagonal layout.... is this possible? seems tricky

  2. #2
    Join Date
    May 2006
    Location
    Australia
    Posts
    53
    Thanks
    11
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget, row offset

    I think i've kind of thought of a way to do it....
    if i can set up the table (or grid layout) to have cells which are slightly smaller than the size of the buttons I am trying to draw, but then i can somehow force the buttons to not be truncated by the cell boundaries but kind of drawn in front, then I could set the starting positions of all the buttons exactly as I want them, and skip every other cell....starting odd/even depending on the row number
    i'd be able to just skip alternate boxes and keep them big, but i want the gaps to be small compared to the button size

    am I just making this more complicated than it has to be???

  3. #3
    Join Date
    May 2006
    Location
    Australia
    Posts
    53
    Thanks
    11
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget, row offset

    don't worry...i've worked it out....I just had to draw things directly onto a QFrame which made it a heck of a lot easier because i could dynamically calculate offsets

Similar Threads

  1. QComboBox in QTableWidget : display troubles.
    By Nyphel in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2007, 00:29
  2. QTableWidget (resizing rows, turning off selection, etc.)
    By kiss-o-matic in forum Qt Programming
    Replies: 6
    Last Post: 11th January 2007, 02:57
  3. QTableWidget issues
    By Djony in forum Qt Programming
    Replies: 42
    Last Post: 20th December 2006, 00:27
  4. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 19:46
  5. Replies: 6
    Last Post: 5th March 2006, 22: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.