Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlQuery - exec in one thread, read result in another. Is it legal?
QtWS25 Last Chance

QSqlQuery - exec in one thread, read result in another. Is it legal?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 744 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • napajejenunedk0N Offline
    napajejenunedk0N Offline
    napajejenunedk0
    wrote on last edited by
    #1

    As the topic says: I have an QSqlQuery created in one thread, but I want to read the results of the query in another one. Is it legal?

    It should be born in mind that one should have a QSqlDatabase per thread as denoted in this topic by JKSH. So, I actually have two db connections for both threads - db thread and the main one. I execute some small stuff in the main one, but mainly read the results of the secondary thread. Is it legal? Does the db cursor in the query gets messed up when it is incremented due to reading the query or etc.?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved