Results 1 to 2 of 2

Thread: How to print QTreeView

  1. #1
    Join Date
    Sep 2007
    Posts
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to print QTreeView

    Hello. I have a problem by printing QTreeView. Can someone make me example ? My treeView put in attachments. How can I do it? How count columns/?
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2006
    Location
    Dresden, Germany
    Posts
    109
    Thanks
    9
    Thanked 12 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to print QTreeView

    What is exactly the problem? For the column count, and other inquiries use the model that is supplying the view with data. In this case,

    treeView->model()->columnCount();

    That is, if your items are all top level items. For items further down in the hierarchy you need to pass the model index of that parent as argument for columnCount().

    Good luck!
    Andreas

Similar Threads

  1. QTreeView repaint
    By graeme in forum Qt Programming
    Replies: 17
    Last Post: 13th March 2012, 13:27
  2. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:22
  3. QTreeView: Holding a line on screen
    By gri in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 11:42
  4. background image in QTreeView
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2007, 06:25
  5. paint QTreeView item !!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2006, 14:24

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.