Home > Mobile >  Ask Daniel, qt + mysql read how to realize the real-time and display the database content
Ask Daniel, qt + mysql read how to realize the real-time and display the database content

Time:01-26

Problem description:
In the continuous write the database server, expectations in the native read from the database and real-time display content,

Excuse me each Daniel, generally use the timer? Expect to have more complete answer, thank you very much!

CodePudding user response:

The
refer to the original poster joqwer response:
problem description:
In the continuous write the database server, expectations in the native read from the database and real-time display content,

Excuse me each Daniel, generally use the timer? Expect to have more complete answer, thank you very much!


Real time in addition to reading couldn't think of any way, I'm on a project is to open a new thread with QTimer dry, but the plan is quite humble,

CodePudding user response:

1. Show and reading the database to make it two programs, respectively for the database reads the program and interface display
2. Read program will read data into the database Shared memory
3. The display program reads the data in the Shared memory, and map interface and regularly update
4. The lock is not necessary, according to the actual situation
  •  Tags:  
  • Qt
  • Related