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?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved Language Bindings
1 Posts 1 Posters 411 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 15 Nov 2022, 08:35 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

    1/1

    15 Nov 2022, 08:35

    • Login

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