Results 1 to 2 of 2

Thread: Filling a ComboBox with SQL query result

  1. #1
    Join Date
    Sep 2014
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Filling a ComboBox with SQL query result

    Hi!

    I am new to Qt (Creator). I have created database apps with FoxPro for over 20 years, and I would like to get into Qt as M$ is binning VFP. I use drop-down combo boxes filled with SQL query results to select related reference data (e.g., an artist for a music database). Is this possibility available in Qt 4/5?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Filling a ComboBox with SQL query result

    Yes.
    QComboBox can work on a model, Qt's SQL module has several of those, e.g. QSqlQueryModel.

    Cheers,
    _

Similar Threads

  1. How to find result of a query in qsqlite?
    By newtowindows in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2009, 11:40
  2. Filling a QGraphicsItem
    By c_srikanth1984 in forum Qt Programming
    Replies: 15
    Last Post: 6th July 2009, 14:34
  3. Filling an image
    By Caius Aérobus in forum Qt Programming
    Replies: 6
    Last Post: 6th July 2008, 21:13
  4. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53
  5. filling scrollview
    By illuzioner in forum Qt Programming
    Replies: 1
    Last Post: 17th February 2006, 22:00

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.