{Qt5.0.2 / QML / QtQuick2.0 / C ++}示例运行没有错误的项目? [英] { Qt5.0.2/QML/QtQuick2.0/C++ } Example Projects that run without errors?

查看:209
本文介绍了{Qt5.0.2 / QML / QtQuick2.0 / C ++}示例运行没有错误的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的设置是 Qt5.0.2 MinGW 32位

我正在寻找 {Qt5.0.2 / QML / QtQuick2.0 / C ++} 代码项目示例 Qt Quick 1.0 )具有实际的C ++类或至少一个 main.cpp

I am looking for { Qt5.0.2 / QML / QtQuick2.0 / C++ } code project examples (not Qt Quick 1.0) that have actual C++ classes or at least a main.cpp .

我浏览了网络,浏览了所有可能找到的例子:

I ran through the web, browsed all examples I could possibly find:

  • http://qt-project.org/ website;
  • github;
  • stack overflow (if anyone had previously addressed this question);
  • http://www.developer.nokia.com/Develop/Qt/Code_examples/

但它们都是旧的 Qt Quick 1.0 )或纯粹的 QML + QtQuick 2.0 或完全没有编译;或者如果他们可以编译,他们显示空对话框(例如,在诺基亚代码示例中的状态喊!)。

but they were either old (Qt Quick 1.0) or pure QML+ QtQuick 2.0 or did not compile at all; or if they could compile, they showed me empty dialogs (for example, the "Status Shout!" in the Nokia code examples).

任何建议将非常感谢。

Any advice would be highly appreciated.

推荐答案

QML上并没有那么多详细的资源,大多数可用的只是短代码示例和文档例子。对于刚接触编程的人来说,这是一个问题,因为这些材料实际上并没有提供如何组合在实践中有用的东西的想法。

There aren't really all that much detailed resources on QML, most of what is available is just short snippet examples and documentation examples. This is a problem for people who are new to programming, because such materials don't really give an idea of how to put together something that is useful in practice.

是真的甚至更是如此对于QtQuick2,这是全新的,甚至文档和许多官方示例仍然不完整。我从经验中知道,按照教程,输入所有内容,期望它工作,并得到意想不到的东西,不知道什么是真正的错误,以及如何解决它。令人沮丧。

This is true even more so for QtQuick2, which is brand new, and even the documentation and many of the official examples are still incomplete. And I know from experience how frustrating it is to follow a tutorial, type everything, expect it to work, and get something unexpected, with no idea what really went wrong and how to fix it.

话虽如此,有一些完整的例子,虽然是微不足道的游戏,在QtQuick1中实现。这不是一个大问题,因为QtQuick2元素是向后兼容的,代码将与QtQuick2几乎没有或完全没有修改。

That being said, there are a few examples of complete, albeit trivial games, that are implemented in QtQuick1. This is not that big of an issue since QtQuick2 elements are backward compatible and the code will work with QtQuick2 with little to no modifications at all.

  • Crash course to Qt Quick Game Programming - PDF

官方示例,偶尔会破损或不完整,也可能有帮助,加上他们很快就会修复(这是关于时间):

The official examples, while occasionally broken or incomplete, can also be of help, plus they will likely be fixed soon (it's about time):

  • QtQuick(2) Code Samples

最后但并非最不重要的是,来自Qt项目网站wiki的QML片段:

Last but not least, QML snippets from the Qt project website wiki:

  • QML snippets, tutorials, best practices, demos...

编辑:添加另一个学习QML的好资源: http://qmlbook.org

To add another good resource for learning QML: http://qmlbook.org

这篇关于{Qt5.0.2 / QML / QtQuick2.0 / C ++}示例运行没有错误的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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