Results 1 to 2 of 2

Thread: I have a problem to modify table

  1. #1
    Join Date
    May 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default I have a problem to modify table

    Hello.

    When I trying to modify table like
    this->m_DbModel->record(0).setValue("dsc",text);
    where m_DbModel is QSqlTableModel, text is QString
    i have no changes in the database.

    When I triyng to modify data directly in the QTableView the changes are commited into the database.

    In the 1st and 2nd cases I use this->m_DbModel->submitAll() operator to save data.

    How do I need to modify my 1st code to save changes into the database?

    Thank you.

  2. #2
    Join Date
    May 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default YES!!!! It works

    this->m_DbModel->record(0).setValue("dsc",text)
    do not work

    but works
    this->m_DbModel->setData(index,text);

Similar Threads

  1. Table Model / View Problem -- Data Not Displaying
    By jhendersen in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2007, 07:45
  2. Relational Table Model Problem
    By aekilic in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2007, 15:57
  3. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 23:12
  4. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 14:50
  5. Problem in Cut Operation
    By ankurjain in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2006, 13:23

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.