Quote Originally Posted by tranfuga25s
what do you mean with create it on stack? using only one query in the wole object?
no..
just write
Qt Code:
  1. QSqlQuery cola("SELECT id, pregunta, respuesta, referencia, dificultad, tema FROM preguntas");
To copy to clipboard, switch view to plain text mode 
and dots " . " instead of the arrows "->" when requesting a member of cola..

then you don't need the "delete cola"..

regards..
aman..