Results 1 to 2 of 2

Thread: Qtreeview not displaying data (data() is called)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2013
    Posts
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Cool Re: Qtreeview not displaying data (data() is called) solved

    i solved the problem

    Qt Code:
    1. int CommandModel::columnCount ( const QModelIndex & parent ) const
    2. {
    3. return 0;
    4. }
    To copy to clipboard, switch view to plain text mode 

    i just needed to change the return from 0 to 1

    Qt Code:
    1. int CommandModel::columnCount ( const QModelIndex & parent ) const
    2. {
    3. return 1;
    4. }
    To copy to clipboard, switch view to plain text mode 

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


Similar Threads

  1. Replies: 4
    Last Post: 22nd January 2013, 19:53
  2. displaying data
    By willief in forum Newbie
    Replies: 4
    Last Post: 10th March 2011, 06:33
  3. Process the display data before displaying in QTreeView
    By babu198649 in forum Qt Programming
    Replies: 5
    Last Post: 23rd June 2009, 05:21
  4. Replies: 1
    Last Post: 3rd December 2008, 15:51
  5. QAbstractTableModel::data not being called...
    By steg90 in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2007, 09:52

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.