Results 1 to 19 of 19

Thread: QTreeView and StylingSheets for QTreeView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTreeView and StylingSheets for QTreeView

    Thanks Anda. I am using HeaderData(), which works, it does return "Name" for index 0. The issue is I can't figure out setHeadData(). It takes in 3 args. An index, the orientation, and an qobject. I don't know what to put as the qobject.
    I was expecting this to work:
    Qt Code:
    1. model.setHeaderData(0, Qt.Horizontal, "Browser")
    To copy to clipboard, switch view to plain text mode 

    But I get an error, something like, "expected QObject, got String"

    I did try this also... ...QObject.tr("Browser") as the 3rd arg, and I didn't get an error, but the header didnt change. It stayed as "Name"
    Last edited by Nfrancisj; 9th July 2016 at 10:32.

Similar Threads

  1. Help ...QTreeView
    By Raymond in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 09:18
  2. QTreeView
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 4th March 2009, 19:51
  3. QTreeView. Qt.4.4.1
    By janEUcitzen in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2008, 08:53
  4. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:22
  5. QTreeView
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 29th May 2007, 08:38

Tags for this Thread

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.