Results 1 to 2 of 2

Thread: Two-row header for QTreeWidget

  1. #1
    Join Date
    May 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Two-row header for QTreeWidget

    Hi,

    I would like to extend header of a QTreeWidget with a second row
    containing QLineEdit Widgets.
    This is for a database interface where the result should be displayed as a tree:

    normal header : [name] [christian name] [day of birth] ...
    qlineedit widgets : [....] [..............] [............]
    treewidgetitem text text text
    treewidgetitem text text text

    I have different ideas like hiding the QTreeWidget header and make my own
    one using two hboxlayouts. But maybe there is a more elegant solution (I'm pretty
    new to GUI programming).

    Best regards,
    Christian

  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: Two-row header for QTreeWidget

    As QHeaderView is not a full featured model-view enabled class, you'll have to either subclass QHeaderView and implement those lineedits yourself there (shouldn't be very hard) or don't bother doing that and simply use the first row of the view for those line edits.

Similar Threads

  1. Replies: 4
    Last Post: 7th April 2010, 23:09
  2. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  3. QTableView header in corner
    By danstr in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2006, 20:16
  4. QTableView: disable row header
    By mattie in forum Qt Programming
    Replies: 6
    Last Post: 8th March 2006, 12:16
  5. qt4+xp: QTreeView w/o header ?
    By incapacitant in forum Newbie
    Replies: 1
    Last Post: 5th March 2006, 18:00

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.