[Qt-interest] How to generate specific column depends on SqlQuery ? [Mysql]

Aaron Lewis aaron.lewis1989 at gmail.com
Sat Mar 13 02:57:42 CET 2010


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




More information about the Qt-interest-old mailing list