Results 1 to 4 of 4

Thread: // Table's items (QStandardItem) independent scale //

  1. #1
    Join Date
    Dec 2010
    Location
    Russia
    Posts
    83
    Thanks
    1
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default // Table's items (QStandardItem) independent scale //

    So yeah , instead of adjusting the size of the whole column/row (by the default) , i need to be able to adjust items' individual size...Any hints are welcome^^
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,709
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: // Table's items (QStandardItem) independent scale //

    Have you tried QStyledItemDelegate ?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2011
    Posts
    79
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: // Table's items (QStandardItem) independent scale //

    You need to subclass your own delegate class, either QAbstractItemDelegate or QStyledItemDelegate
    and reimplement method
    QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index )

  4. #4
    Join Date
    Dec 2010
    Location
    Russia
    Posts
    83
    Thanks
    1
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: // Table's items (QStandardItem) independent scale //

    Well , i decided not to get crazy with repainting items and just switch to the Graphics View instead...it's far more logical to use it for what i'm trying to achieve^^
    But thx for the reply anyway!

Similar Threads

  1. DLL independent development?
    By Sia in forum Qt Programming
    Replies: 4
    Last Post: 5th December 2011, 11:57
  2. Scale independent QGraphicsItem
    By Twoslick in forum Qt Programming
    Replies: 3
    Last Post: 24th March 2010, 05:59
  3. Graphics View: Drawing Items that don't scale
    By Disperato in forum Qt Programming
    Replies: 5
    Last Post: 6th July 2009, 17:16
  4. Apply different scale on items
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 20th February 2009, 06:59
  5. Edit items in table model
    By gyre in forum Newbie
    Replies: 2
    Last Post: 14th January 2008, 03:08

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.