Results 1 to 3 of 3

Thread: TreeView used in Qt Designer New Form dialog?

  1. #1
    Join Date
    May 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default TreeView used in Qt Designer New Form dialog?

    I have a tree model and I want the top level items to look different from those below it. Specifically, the new form dialog in Qt Designer has a tree view with exactly this (see screenshot). How can I replicate this? I've looked through the Qt Designer source code, but I can't pin down what widget that is.

    Thanks!


  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: TreeView used in Qt Designer New Form dialog?

    It's a QTreeView or QTreeWidget with a custom delegate that uses QStyle::drawPrimitive() to render the button-like looks of top level items.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: TreeView used in Qt Designer New Form dialog?

    This thread might be of interest to you

Similar Threads

  1. Form resizes ok in Designer, not in my test app.
    By MrGarbage in forum Qt Tools
    Replies: 2
    Last Post: 30th August 2007, 14:30
  2. Replies: 6
    Last Post: 5th July 2007, 02:00
  3. Replies: 5
    Last Post: 10th May 2006, 00:20
  4. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42
  5. Replies: 4
    Last Post: 6th February 2006, 14:30

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.