Results 1 to 3 of 3

Thread: Share QSqlQuery object to other process

  1. #1
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Question Share QSqlQuery object to other process

    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)

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Share QSqlQuery object to other process

    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.

  3. #3
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Thumbs up Re: Share QSqlQuery object to other process

    Quote Originally Posted by Lesiok View Post
    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

Similar Threads

  1. How to share texture object with mutil qglwidget
    By feiz in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2015, 12:02
  2. Pass QSqlQuery result to object
    By KeineAhnung in forum Newbie
    Replies: 6
    Last Post: 23rd April 2014, 07:50
  3. Problem with inheritance and object share use?
    By tonnot in forum General Programming
    Replies: 2
    Last Post: 1st August 2011, 18:08
  4. Replies: 1
    Last Post: 18th July 2011, 12:12
  5. Replies: 2
    Last Post: 27th April 2009, 15:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.