Qt 和 QML on 2017:快速原型制作

Qt and QML on 2017: Fast Prototyping

我来自 Web Dev,我习惯于使用在任何代码更改后自动更新浏览器的工具快速 html 原型制作,并且想知道什么是最好的 way/tool使用 Qml 编程时实现此目的。

Qt 5.9 和最新的 Qt Creator 对此提供了很好的支持。

最新的代码编辑器可能正是您要找的。

http://blog.qt.io/blog/2017/05/24/qt-creator-4-3-0-released/

For Qt Creator 4.3 we integrated a code editor into Qt Quick Designer. This allows you to use the Properties editor and the Navigator also while editing code. Additionally, you can split the view to show both the graphical and the code editor, and directly see how a change in the graphical editor affects the code, and vice versa. Of course, you can still use the code-only editor in the Edit mode as well.

https://blog.qt.io/blog/2017/05/24/qt-quick-designer-qt-creator-4-3/

Integrated text editor

The most obvious addition is an integrated text editor in the Design mode that also allows editing the QML code side by side with the form editor as a preview. Besides being able to edit QML code while seeing a preview also the property editor can be used together with the text editor. Qt Quick Designer will always select the item that currently contains the cursor.

So if you just forgot the name of a property or enum, you can now use the property editor instead. Switching between the form editor and the integrated text editor is also a lot faster than switching between Edit and Design mode. This makes it more convenient to move to the integrated text editor to refactor or clean up something.

希望对您有所帮助。

Qt 的工具 比 Web 开发人员习惯的要少,这有点遗憾。

有 Terrarium:http://www.terrariumapp.com/ 很酷。

您可以尝试的另一个工具:https://github.com/penk/qml-livereload

虽然它有局限性,但它为您提供了一些基本的实时重新加载功能。

我绝对希望在这方面看到更多。我一直在考虑 writing/contributing 这样的项目。