Results 1 to 2 of 2

Thread: QT - MVC - Refreshing column and row data in the model that is passed to View

  1. #1
    Join Date
    Dec 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QT - MVC - Refreshing column and row data in the model that is passed to View

    Hello All,

    I am passing data to the View(Qtitan::GridBandedTableView similar to TableView) using Model(QStandardItemModel). I want to refresh the data(both columns and rows) when I select a different value in the drop down. Can you please help me with this.

    I am populating QStandardItemModel using
    model->setItem.
    I am passing model to view using
    grid->view<Qtitan::GridBandedTableView>()->setModel(model);

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT - MVC - Refreshing column and row data in the model that is passed to View

    QStandardItem's setData() should already emit the dataChanged() signal, so you should be ok.

    Cheers,
    _

Similar Threads

  1. Replies: 0
    Last Post: 17th July 2015, 00:45
  2. Replies: 8
    Last Post: 16th July 2015, 20:44
  3. Refreshing QTableView data without resetting whole view
    By Tiansen in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2014, 12:22
  4. Model/View one index.column as hidden UserRole
    By doitux in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2008, 13:08
  5. Replies: 6
    Last Post: 20th April 2006, 11:23

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.