PDA

View Full Version : Filling a ComboBox with SQL query result



igr
1st September 2014, 17:43
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?

anda_skoa
1st September 2014, 18:16
Yes.
QComboBox can work on a model, Qt's SQL module has several of those, e.g. QSqlQueryModel.

Cheers,
_