qt 设计器和数据绑定控件?

发布于 2024-09-28 17:31:21 字数 153 浏览 1 评论 0原文

我可以使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏辞 2024-10-05 17:31:22

是的,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文