[Qt-interest] How to generate specific column depends on SqlQuery ? [Mysql]
André Somers
andre at familiesomers.nl
Sat Mar 13 11:17:42 CET 2010
You could rely on QSqlQueryModel. Just feed it the query and your database
connection, and it will return the model you need.
André
-----Oorspronkelijk bericht-----
Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens Aaron Lewis
Verzonden: zaterdag 13 maart 2010 2:58
Aan: qt-interest at trolltech.com
Onderwerp: [Qt-interest] How to generate specific column depends on SqlQuery
? [Mysql]
Hi,
I was wondering how to dynamically create a QTableView.
e.g QSqlQuery.exec(select employee_name,employee_id from employees
where location_id = 110);
I'd like to create a table , add new column depends on what you
selects , in this example ,
it should be employee_name , employee_id , but how do i know what
users type in ?
I'm writing a Mysql Front End , want to generate a nice Table from
user's queries ...
e.g i have a QLineEdit to receive queries , and a PushButton to
triggered sql commands.
Any ideas will appreciate. ;-)
--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list