do i have to delete query object pointer?
-
Then you should rather keep the string of the query and build the QSqlQuery object when you actually need it.
wrote on 29 Jul 2019, 19:18 last edited by@sgaist
then how will the columns get the results? -
Can you share the code you are using ?
It looks like you could make use of a QSqlQueryModel. -
Can you share the code you are using ?
It looks like you could make use of a QSqlQueryModel.wrote on 29 Jul 2019, 19:26 last edited by user4592357@sgaist
no i'm on mobile now, and soon to sleep. will take a look at it tomorrow and see if i can use it. thanks -
@sgaist
no i'm on mobile now, and soon to sleep. will take a look at it tomorrow and see if i can use it. thankswrote on 5 Aug 2019, 05:41 last edited by@SGaist
i took a look atQSqlQueryModel
but i guess i can't use it because my table view already has a model. -
What kind ?
-
wrote on 6 Aug 2019, 06:10 last edited by
@sgaist
it isQAbstractTableModel
-
You can replace your model unless you are doing something special with it ?
-
wrote on 7 Aug 2019, 04:37 last edited by
@sgaist
that's the thing. i can't replace it cause it's doing a lot of things (it's part of a library someone has created and I'm using it) -
How are you using it since you need to query a database ?
-
wrote on 7 Aug 2019, 17:01 last edited by
@sgaist
it has some long logic built into it, it sets up a lot of connections etc.
16/16