Qt:使用 c++ 与使用 xml 与使用 qml 的 UI [英] Qt: UI with c++ vs with xml vs with qml

查看:57
本文介绍了Qt:使用 c++ 与使用 xml 与使用 qml 的 UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天开始学习qt,有个问题.当我创建一个项目时,它带有 *.ui 文件,它是 XML 类型的文件,但在书中,我只使用纯 C++(类)创建 UI.我听说还有另一种使用 qml 创建 UI 的方法.

I have started learning qt today and have a question. When I create a project, it comes with *.ui file which is XML kind of file but in the book, I am only creating UI with pure c++(classes). I have heard there is another way of creating the UI with qml.

那么,每种 UI 创建方式的优缺点是什么?

So, What are pros and cons of each UI creating way?

提前致谢

我使用的是 QT 5.1.0

I am using QT 5.1.0

推荐答案

不要忘记,您还可以嵌入 QtWebkit 视图并直接使用 HTML 作为用户界面控件.

Don't forget that you can also embed a QtWebkit view and use HTML directly as the user interface controls.

可以提供包含每个子框架细节的冗长答案,但 QT 项目人员已经用他们自己的图表回答了这个问题:

A lengthy answer with the specifics of each sub-framework could be provided, but the QT project people have already answered this question with a chart of their own:

http://qt-project.org/doc/qt-5.1/qtdoc/topics-ui.html#comparison

这篇关于Qt:使用 c++ 与使用 xml 与使用 qml 的 UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆