sql + listview
Verfasst: 5. Mai 2005 14:42
Hello,
I have a sql query and a ListViwe. I want to pu the values in my listview.
How can i make that?
I have no idea...
Thanks
void Form1::aselect()
{
QSqlQuery query;
query.exec("SELECT title, artist FROM sounds");
QMessageBox::information(this,
("Info"),
("Query ok"));
while(query.next()){
QString title = query.value(0).toString();
QString artist = query.value(1).toString();
}
}
I have a sql query and a ListViwe. I want to pu the values in my listview.
How can i make that?
I have no idea...
Thanks
void Form1::aselect()
{
QSqlQuery query;
query.exec("SELECT title, artist FROM sounds");
QMessageBox::information(this,
("Info"),
("Query ok"));
while(query.next()){
QString title = query.value(0).toString();
QString artist = query.value(1).toString();
}
}