Results 1 to 4 of 4

Thread: setting row height in QTreeView?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    55
    Thanked 12 Times in 11 Posts

    Default Re: setting row height in QTreeView?

    Using SizeHintRole roles works perfectly!

    I gave the delegate thing a try, but it didn't seem to work, wasn't even getting any breakpoints hit inside. Aren't delegates only used by the app when you try to edit a cell (such as by trying to double-click on it)
    Software Engineer



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

    Default Re: setting row height in QTreeView?

    Quote Originally Posted by gfunk
    Aren't delegates only used by the app when you try to edit a cell (such as by trying to double-click on it)
    No, they also render items to the view and return size hints for them.

Similar Threads

  1. Set height of QTableView to fit exact number of rows.
    By Ben.Hines in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2019, 01:49
  2. QTreeView repaint
    By graeme in forum Qt Programming
    Replies: 17
    Last Post: 13th March 2012, 13:27
  3. height()
    By mickey in forum Newbie
    Replies: 1
    Last Post: 22nd March 2006, 20:32
  4. paint QTreeView item !!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2006, 14:24
  5. QSortFilterProxyModel & QTreeView
    By Bear in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 15:04

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.