Results 1 to 3 of 3

Thread: Personalize QSqlTableModel

  1. #1
    Join Date
    Aug 2010
    Posts
    26
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Personalize QSqlTableModel

    Hi everyone, my question is simple.
    I have a QTableView with a QSqlTableModel as a model, and everything as usual, but i need to show a collum (category), witch is the id's of the category of the product, with the name of the category, not the id, so i need to do a lookup in the database but, how do I do this? i mean... how do a make the model or tableview show another stuff when it actually just load the whole table? i hope i made it clear enough, my english is very bad, yet. thanks in advance
    Last edited by BrainStorm; 13th August 2010 at 22:41. Reason: spelling corrections

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

    Default Re: Personalize QSqlTableModel

    If I understand you right, you are looking for QSqlRelationalTableModel.

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

    BrainStorm (14th August 2010)

  4. #3
    Join Date
    Aug 2010
    Posts
    26
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Personalize QSqlTableModel

    Quote Originally Posted by Lykurg View Post
    If I understand you right, you are looking for QSqlRelationalTableModel.
    thanks very much!

Similar Threads

  1. QSqlTableModel
    By codeman in forum Qt Programming
    Replies: 7
    Last Post: 4th May 2009, 11:04
  2. QSqlTableModel and LIKE
    By JeanC in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2008, 08:45
  3. QSqlTableModel Help pls
    By munna in forum Newbie
    Replies: 1
    Last Post: 7th March 2006, 19:40
  4. QSqlTableModel
    By raphaelf in forum Qt Programming
    Replies: 4
    Last Post: 4th March 2006, 12:35
  5. QSqlTableModel Help pls
    By munna in forum Newbie
    Replies: 1
    Last Post: 26th January 2006, 07:58

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.