Results 1 to 7 of 7

Thread: QGridBox too many items?

  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 QGridBox too many items?

    I am trying to get an array of 10x10 buttons for which the icon has been set to be a small circle (i understand that is pretty average as far as usability and cluttering the screen, but it is for a very specific purpose and we haven't been able to think of any other way of presenting the information) --- I am probably looking to make them about the size and shape and layout as the smilies which are to the right of the message box when you are writing a new post except in approximately the size of the message box itself....anyhoo....so when i make a grid box, all the buttons are now about 1mm*6mm, even though there is plenty of room all around them in every direction

    any ideas....

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGridBox too many items?

    Maybe you should use QTableView instead?

  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: QGridBox too many items?

    cool thanks...
    but there is still a lot of white space around the items.....how can i force the buttons to take up more of the cell, or more correctly i guess, make sure the cells stick to the size of their contents?
    I've tried using resizeRowToContents, but this resizes the row to the correct size, but then still pads with whitespace so now the button is barely visible in the middle of the cell....
    same thing happens with setRowHeight....

    also, i'd rather not have the grid lines there.....

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGridBox too many items?

    Quote Originally Posted by georgie
    also, i'd rather not have the grid lines there.....
    QTableView::showGrid(false)

    I won't answer rest of the questions at this hour

  5. The following user says thank you to wysota for this useful post:

    georgie (11th May 2006)

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

    Default Re: QGridBox too many items?

    haha
    I won't answer rest of the questions at this hour
    what u talkin about? it's 11.13 am tomorrow here in australia :P....

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGridBox too many items?

    Quote Originally Posted by georgie
    haha

    what u talkin about? it's 11.13 am tomorrow here in australia :P....
    So buy me a ticket to Australia and then I'll answer your questions at 11.13

    About your question, could you provide a screenshot of the current situation?

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

    Default Re: QGridBox too many items?

    i fixed it just then...thanks anyway....i ended up drawing them straight into a QFrame instead of a layout, because of the fact that i wanted to also offset some rows (i made another thread about that though...)....that way I can be a lot more specific about exactly the position I want....also i can now have different numbers of elements which is also a good thing...

Similar Threads

  1. Some menubar items can not be clicked
    By richardander in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2009, 00:26
  2. Use delegate to draw different type of items
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2009, 13:16
  3. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51
  4. Occurance of Duplicate items in QComboBox
    By merry in forum Qt Programming
    Replies: 8
    Last Post: 12th September 2007, 15:05
  5. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20

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.