Qt Code:
  1. QString timess;
  2. QSqlQuery qry;
  3. qry.prepare("SELECT FROM test WHERE time = '"+timess+"'");
  4. if (qry.exec()){
  5. ui->time->setText(timess);
  6. qDebug("timess");
  7. };
To copy to clipboard, switch view to plain text mode 

This is my code. after I Run ui didn't show anything.

I create timess with qstring and store the time value from database(SQLite) into it's.
But in the time ui (QLable) didn't show anything after I run the process.