I'm now trying to connect to my app to MySQL using mysql.h from MySQL 4.1.... as I just can't make the damn plugin... somewhere theres a post explaining the plugin stuff..

The thing now is that after I made the connection I retrieve the table list as this:

Qt Code:
  1. .......
  2. #include <mysql.h>
  3. ....
  4. ..
  5. MYSQL_RES *res;
  6. ...
  7. ..
  8.  
  9. QStringList tablas()
  10. {
  11. if (!res=mysql_list_tables( &mysql, NULL ))
  12. {
  13. QMessageBox::warning(0,"No se pudo obtener la lista de tablas", mysql_error( &mysql ));
  14. }
  15. QStringList listaTablas = res->toStringList;
  16. //convert MYSQL_RES to QSTRINGLIST ???
  17. for ( QStringList::Iterator it = listaTablas.begin(); it != listaTablas.end(); ++it ) {
  18. qWarning(*it + "\n");
  19. }
  20. //muestra en consola la lista de tablas de la base de datos a la que se conecto
  21.  
  22. return listaTablas;
  23. }
To copy to clipboard, switch view to plain text mode 

so the question is..... tararraaarrataaan.
how do i get res to fill a QStringList?

I've tryed casting:
Qt Code:
  1. QStringList listaTablas = (QStringList)res;
To copy to clipboard, switch view to plain text mode 

Dumbass way:
Qt Code:
  1. QStringList listaTablas = res;
To copy to clipboard, switch view to plain text mode 

and DumbAss2 xD as there is no member... etc
error: 'struct st_mysql_res' has no member named 'toStringList
Qt Code:
  1. QStringList listaTablas = res->toStringList;
To copy to clipboard, switch view to plain text mode 


Any ideas?
the final idea is to fill a qcombobox with the QStringList with the table list

Qt Code:
  1. CB_Tablas->insertStringList(tablas());
To copy to clipboard, switch view to plain text mode 

as you can see the function named tablas returns a QStringList that contains or should contain the table list from the database

please don't tellme to use qdatabase.h as that's now not an option