OK i dont know if it is the hour or what but this lines cause the program to finish unexpectedly, only if the process is called more than once. I mean everything goes fine when i click the button for the first time but if I click it again bamm app exits:
RandomInfo *randurl = new RandomInfo ();
if (url.
contains (QString ("ya_cerramos"))) else{
bg
= QPixmap (randurl
->getRandomUrl
());
}
this->ui->label_imagen->setPixmap (bg);
frase_autor = randurl->getFraseRandom ();
QPixmap bg;
RandomInfo *randurl = new RandomInfo ();
if (url.contains (QString ("ya_cerramos")))
bg = QPixmap (url);
else{
bg = QPixmap (randurl->getRandomUrl ());
}
this->ui->label_imagen->setPixmap (bg);
QStringList frase_autor = QStringList ();
frase_autor = randurl->getFraseRandom ();
To copy to clipboard, switch view to plain text mode
PS: this is the code of the method that returns the list, just in case:
frase_autor << query->value (1).toString ().trimmed ()<< query->value (2).toString ().trimmed ();
return frase_autor;
QStringList frase_autor;
frase_autor << query->value (1).toString ().trimmed ()<< query->value (2).toString ().trimmed ();
return frase_autor;
To copy to clipboard, switch view to plain text mode
BTW i dont get any error while executing this, the list is returned...the problem is when I assign the return list to the list of the mainclass...
Bookmarks