hi,
i am trying to get the result of a query.the databaseconnection seems to work, then i do:
QSqlQuery query("SELECT s2 FROM test", db);
while (query.next())
{
Beschriftung = query.value(0).toString();
}

compiler tells me:
invalid use of undefined type 'struct QVariant'
for the line where i try get the query value. (Beschriftung has been declared as QString further up).

From the docs i understand that query.value(0) will be variant, but i thought with the toString() i get a string and can put it into Beschriftung? After all this line is more or less directly from the doc

oh, btw: i wanted to check if db isn't by some chance out of scope. it's been some time that i learned some c and i am now just trying to remember. For the last years i have only been scripting in php, so i tried:
if (!db)
if (db == false)
but nothing works. the last line gives me a compilererror of
no match for 'operator==' in 'db == false'

what is that suppossed to mean?