Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [pyqt] how QSqlQueryModel insert a record and update view?

[pyqt] how QSqlQueryModel insert a record and update view?

Scheduled Pinned Locked Moved Unsolved Language Bindings
1 Posts 1 Posters 407 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.
  • A Offline
    A Offline
    ArthurPYQT
    wrote on last edited by
    #1

    scenario: I wanna to fetch data from online, and display data with tableview, save data at the same time. Provided I adopt the QSqlQueryModel approach, everytime I get a new record from online, I need to setQuery() to refresh the tableView. If the records amount a lot, setQuery() will result in repainting over and over again, which will deteriorate the performance of GUI responsiveness.

    why QSqlQueryModel? because the data will be read from joint tables and written respectively.

    so any better idea to refresh the view synchronizedly?

    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