qt qml 和 qt quick 的区别 [英] Difference between qt qml and qt quick

查看:65
本文介绍了qt qml 和 qt quick 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 QML、QtQuick 1.0 和 QtQuick 2.0 感到困惑.它们有什么区别?

I'm confused with QML, QtQuick 1.0 and QtQuick 2.0. What's the difference between them?

我使用基于 Qt 5.1.1 的 QtCreator 2.8.1.我想开发一个桌面程序,我应该使用哪种技术?

I use QtCreator 2.8.1 based on Qt 5.1.1. I want to develop a desktop program, which technology should I use?

推荐答案

请参考@TheBootroo 以获得更好的答案

虽然我的答案被 OP 接受了,但我想修改(甚至)删除我的答案.

Although my answer was accepted by the OP, I want to revise (or even) remove my answer.

我的回答是基于 2013 年 Qt 5.2 的个人经验,其中一些在今天不再有效:

My answer was based on personal experiences with respect to Qt 5.2 in 2013 some of which is no longer valid today:

  • QML 是 Qt Meta Language 或 Qt Modeling Language 是一种用户界面标记语言.
  • QtQuick(QtQuick 1.x 和 QtQuick 2.x)使用​​ QML 作为声明性语言来设计以用户界面为中心的应用程序.

回到 Qt 5.2,当您构建 Qt Quick 应用程序时,一个重要的问题是该应用程序是 QtQuick 1.x 还是 QtQuick 2.x.这不仅影响了可用的组件,而且还改变了应用程序的呈现方式.

Back at Qt 5.2 when you built a Qt Quick Application a significant question was whether the app was QtQuick 1.x or a QtQuick 2.x. Not only did this affect the components that were available, but, it altered how the application was rendered.

回到 2013 年:

  • 如果您必须针对较旧的操作系统(例如 Windows XP)或较旧的硬件(例如 OLPC),通常会选择 QtQuick 1.x 应用程序,因为 QML UI 组件(例如按钮)是由您的操作系统的本机组件呈现的.但是,这意味着您的目标是一组最低公分母的 UI 组件,并且您的 UI 体验可能因平台而异.

  • QtQuick 1.x applications was often chosen if you had to target older operating systems (e.g. Windows XP) or older hardware (e.g. OLPC) because the QML UI components such as Buttons were rendered by components native to your OS. However, this meant you were targeting a lowest common denominator set of UI components and that your UI experience may vary from platform to platform.

选择 QtQuick 2.x 应用程序以获得更一致的跨平台外观,但是,它要求您的平台充分实现 OpenGLES,否则您的应用程序可能无法加载.不幸的是,这将您的应用程序限制为仅适用于实现 OpenGLES 的最新计算机和设备.

QtQuick 2.x application was chosen for a more consistent cross platform look, but, it required that your platform implemented OpenGLES sufficiently else, your application may fail to load. This, unfortunately, restricted your application to only the newest computer and devices that implemented OpenGLES.

当我写下我的原始答案时,这导致我在某些情况下推荐 QtQuick 1.x,而不是 QtQuick 2.x.

When I wrote my original answer, this lead me to recommend QtQuick 1.x in some scenarios over QtQuick 2.x.

但是,从那时起,Qt 5+ 现在允许您在 Windows 上定位 ANGLE,通过将调用转换为 Direct3D,它具有更好的驱动程序支持,从而为 Windows 桌面带来高性能 OpenGL 兼容性.

However, since then, Qt 5+ now allows you to target ANGLE on Windows which brings high performance OpenGL compatibility to Windows desktops by translating calls to Direct3D, which has much better driver support.

这篇关于qt qml 和 qt quick 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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