Hi all,
I try to write a function, which generates a QSqlQueryModel and returns this model to the calling function. First I thought, this should be an easy thing but obviously I was wrong!
I searched the forum but found no information, which could help me...
My function:
Qt Code:
{ QSqlQueryModel model; qry->prepare("select * from tbl_connections"); qry->exec(); model.setQuery(*qry); return model; }To copy to clipboard, switch view to plain text mode
When I try to compile the code I get following error message:
Fehler: C2280: 'QSqlQueryModel::QSqlQueryModel(const QSqlQueryModel &)': attempting to reference a deleted function
I didn't find an explanation on the net which helped me to understand the problem, so maybe someone here is so kind to help me a little bit?
Thanks in advance!!
Viktor
Bookmarks