-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get field default value from the database #40
Comments
please show your code |
First, thanks for your attention. from PySide6.QtWidgets import QApplication, QWidget, QTableView, QVBoxLayout app = QApplication(sys.argv) window = QWidget() model = QSqlTableModel() tblView = QTableView() dbRecord = db.record("tickets") dbRecord.field(1).setDefaultValue("someValue") modelRecord = model.record() modelRecord.field(1).setDefaultValue("someValue") window.show() All results |
apparently this already has been reported 12 years ago in Qt's bug tracker, but didn't get a fix: https://bugreports.qt.io/browse/QTBUG-19487 |
Thank you Really appreciated |
Cannot get columns default values from the database either through QSqlTableModel.record() nor QDatabase().record(), always None. Also setDefaultValue() does nothing. all field datatypes. Working with sqlite database.
I use Windows 11 x64, PyQt6 v6.6.2 and MySql Community server v8.0.32. I tried also with PyQt5 and other versions of PyQt6
The text was updated successfully, but these errors were encountered: