Results 1 to 5 of 5

Thread: PyQt4 tree model

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Wink Re: PyQt4 tree model

    Try putting the following in headerData():
    Qt Code:
    1. if(orientation == Qt.Horizontal and role == Qt.DisplayRole):
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by MTK358 View Post
    ... there is an arrow (like the one to view the item's children) on each line.
    Check out QTreeView::rootIsDecorated()

    BTW, I didn't mean to put the angry emoticon in the title of my first post.

  2. The following user says thank you to norobro for this useful post:

    MTK358 (24th February 2011)

Similar Threads

  1. SQL Tree Model Help
    By MTK358 in forum Newbie
    Replies: 9
    Last Post: 22nd June 2015, 15:02
  2. custom model + PyQt4
    By wirasto in forum Qt Programming
    Replies: 6
    Last Post: 20th July 2009, 08:42
  3. Replies: 12
    Last Post: 5th July 2009, 16:03
  4. Writing a Tree model.
    By kaushal_gaurav in forum Qt Programming
    Replies: 6
    Last Post: 16th January 2009, 11:22
  5. using the example of simple tree model
    By krishna.bv in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2006, 12:28

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.