PDA

View Full Version : QTableWidget, row offset



georgie
11th May 2006, 02:55
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

georgie
11th May 2006, 03:42
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
:confused:
am I just making this more complicated than it has to be???

georgie
11th May 2006, 11:23
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 :)