What We Know About QSqlQuery - russ-hensel/qt5_by_example GitHub Wiki
QSqlQuery is a non-visual widget ( some authors may not call a non-visual element a widget, but we do ) that facilitates the use of SQL to query, define, add, delete and update elements in an SQL database. It is fairly close to using Python's low level interfaces to SQL. It is simple to use and very handy when there are no visual results, or the display method is obscure.
The tab is QSqlQueryTab in qt5_by_example/tabs/tab_q_sql_query.py at main ยท russ-hensel/qt5_by_example https://github.com/russ-hensel/qt5_by_example/blob/main/tabs/tab_q_sql_query.py and it is a reference for QSqlQuery
Since the widget is not visible there is not much to do in terms of mutating the widget state so we do not have the usual mutate-examine button. Instead we have dedicated buttons that do what they say. For more detail read the code.
Included are...... ( or planned )
- Update
- Insert
- Delete
This widget has almost the same name as QSqlQueryModel but that is a different widget, we have it in another tab.