Results 1 to 3 of 3

Thread: Model Or View problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Model Or View problem

    Where did you set the database to the model?

    try:
    Qt Code:
    1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
    2. db.setDatabaseName("/Users/k12yp70n/Desktop/test"); // is "test" a database or a path?
    3. db.open();
    4. model = new QSqlTableModel(this, db);
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to Lykurg for this useful post:

    Nefastious (9th October 2009)

  3. #2
    Join Date
    Sep 2009
    Posts
    34
    Thanks
    28
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Model Or View problem

    Ow lawd... I never thought it would be so simple to solve... Thank you very much...

Similar Threads

  1. Replies: 2
    Last Post: 10th August 2009, 09:45
  2. Problem with list View
    By yuvaraj.yadav in forum Qt Programming
    Replies: 9
    Last Post: 29th April 2009, 14:02
  3. A few queries about Model View Programming
    By montylee in forum Qt Programming
    Replies: 46
    Last Post: 2nd March 2009, 08:36
  4. Replies: 1
    Last Post: 14th January 2009, 10:10
  5. View update problem
    By prakash in forum Qt Programming
    Replies: 6
    Last Post: 17th March 2006, 10:13

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
  •  
Qt is a trademark of The Qt Company.