Qt postgres stored procedures
Hello, i have a trouble, i have a postgres stored function that should retrieve a ref cursor, when i call it with this instructions:

Qt Code:
  1. qdb.prepare("SELECT * from myfunction('cursor'); fetch all in cursor" );
  2. qdb.exec();
To copy to clipboard, switch view to plain text mode 

and i try to show it in a tableview:

Qt Code:
  1.  
  2. model->setQuery(qdb1);
  3.  
  4. ui->tableView->setModel(model);
To copy to clipboard, switch view to plain text mode 

In the tableview i only see the name of the cursor instead of the table.


So where's the problem?
when i use the same SQL query in pgadmin it returns me the table, so it goes good, but does it go wrong in Qt? Where am i wrong?
Thenks for the help!!