PDA

View Full Version : Share QSqlQuery object to other process



ramkumar.mobis
29th September 2016, 14:10
Hello All,

My requirement is I want create a SQlite Helper application like server
Which maintains my Phonebook database. This application will open database and other apps which want to access Contacts will request to it using any IPC(D-Bus)

Then my application make query and share the QSqlQuery object to it using shared memory or any IPC concept

So that the client application will use the QSqlQuery object and do "next" "prev" on it to load required results

(Android Content Providers do the same )

My question is , Is there any way to share QSqlQuery object to other application process (using shared memory or any other Process)

Lesiok
29th September 2016, 14:50
You can not do because QSqlDatabase : A connection can only be used from within the thread that created it. Moving connections between threads or creating queries from a different thread is not supported.

ramkumar.mobis
30th September 2016, 05:25
You can not do because QSqlDatabase : A connection can only be used from within the thread that created it. Moving connections between threads or creating queries from a different thread is not supported.

Thanks for the response