Results 1 to 2 of 2

Thread: QSqlTableModel Help pls

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QSqlTableModel Help pls

    Hi,

    I am using SQLite as my database. I have around 12 tables from which data needs to be taken and displayed. I am not displaying the data in tables or tree format but some custom format. My doubt is that, can I use QSqlTableModel for my task?

    Also the user might edit the data and add some data into the table. How can I do the editing part using the QSqlTableModel?

    Thanks a lot

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSqlTableModel Help pls

    Quote Originally Posted by munna
    I am using SQLite as my database. I have around 12 tables from which data needs to be taken and displayed. I am not displaying the data in tables or tree format but some custom format. My doubt is that, can I use QSqlTableModel for my task?
    Yes
    Quote Originally Posted by munna
    Also the user might edit the data and add some data into the table. How can I do the editing part using the QSqlTableModel?
    If i understand you correctly, QSqlTableModel should itself do that. You just need to use QSqlTableModel::setData()

Similar Threads

  1. QSqlTableModel & treeview
    By janEUcitzen in forum Qt Programming
    Replies: 6
    Last Post: 14th November 2008, 21:00
  2. Trouble with "INSERT" by QSqlTableModel
    By AD in forum Qt Programming
    Replies: 12
    Last Post: 10th November 2008, 09:21
  3. QSqlTableModel slow even with manual submit
    By pherthyl in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2008, 21:40
  4. QSqlTableModel inserts empty rows
    By Nesbitt in forum Qt Programming
    Replies: 2
    Last Post: 6th August 2008, 13:47
  5. Replies: 4
    Last Post: 9th May 2008, 18:02

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.