Results 1 to 3 of 3

Thread: QTableView row/column count [SOLVED]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default QTableView row/column count [SOLVED]

    Hi,

    I'd like to know how many rows/columns my qTableView has.

    I was trying something like:

    Qt Code:
    1. QAbstractItemModel* tableModel= my_table->model();
    2. QModelIndex index = my_table->currentIndex();
    3.  
    4. int iRows = tableModel->rowCount(index);
    To copy to clipboard, switch view to plain text mode 

    But it doesn't work

    How I can do it? thanks!
    Last edited by jano_alex_es; 14th May 2009 at 11:10. Reason: Solved

Similar Threads

  1. Program running error in qtopia 2.2.0
    By halloworld in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 15th February 2009, 09:23
  2. Replies: 3
    Last Post: 29th January 2009, 08:38
  3. QTableView in ui with model/delegate
    By tpf80 in forum Qt Programming
    Replies: 7
    Last Post: 6th November 2008, 23:00
  4. make QTableView work as a multi-column list view
    By wesley in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2008, 14:43
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.