Results 1 to 3 of 3

Thread: Direct root childs inline QTreeView

  1. #1
    Join Date
    Dec 2008
    Location
    Irkutsk, Russia
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Direct root childs inline QTreeView

    Functionality of QTreeView is not enough for my trouble: my model have 2 hierarchical levels. First level - name of group of items. Second level - items in table. I want to use QTreeView, and have a problem: names of groups are very long strings (about 200 characters) and if I want to see all group name I have to resize first column of my QTreeView.

    That is standard functionality:

    That what I want to get:

    Can QTreeView do that (may be I need special model)? If it cann't, how can I reimplement it?

    P.S. Excuse me for my English.

  2. #2
    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: Direct root childs inline QTreeView

    May be you can try using QTreeView::drawRow by inheriting your treeview class

    You can set some type for the item to identify it. Then draw row urself.
    For other rows, you will need to simply call the base class function

  3. #3
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Direct root childs inline QTreeView


Similar Threads

  1. Qt 4.2.2 and SuSE Linux 9.3
    By Teuniz in forum Installation and Deployment
    Replies: 15
    Last Post: 26th February 2007, 13:21

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.