qt 设计器和数据绑定控件?
我可以使用 QT Designer 4 创建/设计表或其他自动绑定到数据库连接的控件吗?
或者我必须在我的应用程序中为此编写特定的代码吗?
(我在 Windows xp 上使用 python 2.5 和 pyqt 4.8,如果有的话)
谢谢。
can I use QT Designer 4 to create / design tables or other controls with automatic binding to database connections?
Or must I write specific code for that in my application?
(i'm using python 2.5 with pyqt 4.8 on Windows xp, if it matters)
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,Qt 使用 MVC 模型支持这一点,但是您需要一些代码(实际上不是太多)来建立数据库连接和 QSqlTableModel 的一些设置,稍后可以使用 QTableView 显示。
Yes, Qt supports this using the MVC model, but you need some code (not too much really) to make the Database connection and some settings of a QSqlTableModel, which can be later shown with a QTableView.