Results 1 to 8 of 8

Thread: Querying a database and populating a combobox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo
    Thanks
    8
    Thanked 3 Times in 3 Posts

    Default Re: Querying a database and populating a combobox

    setModel method of QComboBox is reimplemented, it's argument is QAbstractItemModel
    do as Lykurg suggested you to do, and simple use setModel to set QSqlQueryModel model for combo box

    check the documentation of QSqlQueryModel if you do not know which method use to set the query
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

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

    Splatify (21st February 2011)

Similar Threads

  1. Database combobox search
    By poporacer in forum Newbie
    Replies: 10
    Last Post: 24th October 2010, 14:21
  2. Populating, signals and comboboxes
    By ShamusVW in forum Newbie
    Replies: 6
    Last Post: 12th August 2010, 06:43
  3. Querying object type using itemAt
    By ajb in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2009, 16:35
  4. Querying within Threads
    By bera82 in forum Qt Programming
    Replies: 11
    Last Post: 12th March 2008, 01:08
  5. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53

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