I'm trying to make an app that displays a MySQL table on a QDataTable... I'm in trouble filling the table... and the main problem is that the user inputs the info of the table he wants to see, on the MainForm

The user inputs:
Host, DataBase, Username,Password and the table he wants to display....
as you may know the tables are diferent.. everyone has it's own columns and data..
so my problem is how to fill a QDataTable with any MySQL table that the user inputs.. as The user has no idea of the conformation and content of the table. And ofcourse he doesn't need to... the user only needs to know the host, database, his username, password, and the table he wants to see..

I can't get to see how to get it.. because I don't know how to get the numbre of columns so I can make a for maybe to be adding columns to de datatable as I need to.


Help PLZ :$

I can't find any info not even on the QT Books or MySQL books
if you need anymore info please ask