Qt Designer用于GUI的C ++或QML [英] Qt Designer C++ or QML for GUI

查看:263
本文介绍了Qt Designer用于GUI的C ++或QML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道QML的使用在QT是相当新的,我想知道我是否应该使用QTDesigner或QML设计我的应用程序。我将使用MVC模式,我的主要关注,如果我使用QML的GUI是,它可能不容易集成在我的C ++应用程序的reste。

I know that the use of QML is quite new in QT and I was wondering if I should design my application using QTDesigner or QML. I will be using a MVC pattern and my main concern if I use QML for the GUI is that it might not be easy to integrate inside the reste of my C++ app.

随时给您个人的建议,我会非常感谢。
谢谢!

Feel free to give your personal advice, I would greatly appreciate it. Thank you!

推荐答案

QML主要面向移动平台。由于其年轻和对各种平台界面约定的关注,它缺少标准控件,如按钮和组合框(但请参阅 Components 项目)。如果您使用行动装置,或是您的使用者介面需要高度自订的视觉样式,可能需要考虑QML 准备在设计自定义控件方面的大量额外工作。在我看来,集成QML和C ++仍然相当粗糙。我个人建议使用QML只用于更简单的应用程序,只在移动平台上,并且只使用JavaScript。在正确的情况下,我可能考虑在C ++中编写自定义QML元素。

QML is primarily intended for mobile platforms. Due to its youth and its concern for varied platform interface conventions, it lacks standard controls like buttons and combo boxes (but see the Components project). If you're on mobile, or your UI requires a highly customized visual style, QML might be worth considering. Be prepared for a lot of extra work in designing custom controls. Integrating QML and C++ is still pretty rough in my opinion. I would personally recommend using QML only for simpler apps, only on mobile platforms, and only with JavaScript. Under the right circumstances I might consider writing custom QML elements in C++.

Qt的C ++ API不会很快消失。它的设计也考虑到了桌面,并能更好地满足用户在桌面平台上的期望。 如果您在桌面上,我建议您坚持使用C ++和Designer。即使QML成熟后,它也可能不适合大多数桌面应用。

Qt's C++ API isn't going away anytime soon. It's also designed with the desktop in mind and will do a better job of meeting user expectations on desktop platforms. If you're on the desktop, I would recommend sticking to C++ and Designer. Even after QML matures a bit, it probably won't be the right solution for most desktop apps.

看起来像是开始更改。我还没有尝试过新的组件,文档似乎有点稀疏(或至少,出了路),但这可能最终消除了在桌面上使用QML的最大障碍。这是否会得到长期的支持还有待观察,但如果你愿意接受成为早期采用者的风险,我认为QML现在可能是桌面应用程序的可行选择。

It looks like things are beginning to change. I haven't tried the new components myself yet, and documentation seems a little sparse (or at least, out of the way), but this could eventually remove the greatest barrier to using QML on the desktop. It remains to be seen whether this will get support in the long term, but if you're willing to accept the risk of being an early adopter, I think QML may now be a viable choice for desktop apps.

这篇关于Qt Designer用于GUI的C ++或QML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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