Results 1 to 3 of 3

Thread: problem with QTableView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    27
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Question problem with QTableView

    hello

    I have the following code:

    Qt Code:
    1. model = new QStandardItemModel();
    2. channel = new QTableView(this);
    3. channel->setModel(model);
    4.  
    5. model->setData(model->index(d,0,QModelIndex()), 0 );
    6. model->setData(model->index(d,1,QModelIndex()),Channel);
    7. model->setData(model->index(d,2,QModelIndex()),Unit);
    8. model->setData(model->index(d,3,QModelIndex()),dimension);
    9. model->setData(model->index(d,4,QModelIndex()),code);
    10. model->setData(model->index(d,5,QModelIndex()),description);
    To copy to clipboard, switch view to plain text mode 

    I want you to just click on a box, return the row number where the selected field.
    Last edited by jackajack01; 9th August 2012 at 20:39.

Similar Threads

  1. QTableView - CSS Problem
    By Sir Rogers in forum Qt Programming
    Replies: 0
    Last Post: 14th February 2011, 19:10
  2. Qtableview problem
    By kira411 in forum Qt Programming
    Replies: 0
    Last Post: 30th July 2010, 10:34
  3. Problem with QTableView
    By habeas_corpse in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2008, 22:17
  4. Problem with QTableView
    By BoneCollector in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2008, 12:30
  5. Problem about QTableView.
    By fengtian.we in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 23:13

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.