
Qt6 QML Book
文章平均质量分 76
꧁白杨树下꧂
这个作者很懒,什么都没留下…
展开
-
Qt6 QML Book/Qt Quick 3D/材料和灯光
Up until now, we've only worked with basic materials. To create a convincing 3D scene, proper materials and more advanced lighting is needed. Qt Quick 3D supports a number of techniques to achieve this, and in this section we will look at a few of them.到目前翻译 2022-07-13 16:17:57 · 827 阅读 · 1 评论 -
Qt6 QML Book/Qt Quick 3D/使用资产
When working with 3D scenes, the built in meshes quickly grow old. Instead, a good flow from a modelling tool into QML is needed. Qt Quick 3D comes with the Balsam asset import tool, which is used to convert common asset formats into a Qt Quick 3D friendly翻译 2022-07-12 13:54:07 · 829 阅读 · 0 评论 -
将QML编译为C++:修复非限定访问
Wednesday July 13, 2022 by Ulf Hermann | Comments2022年7月13日星期三,乌尔夫·赫尔曼评论This is the eighth installment in the series of blog posts on how to adjust your QML application to take the maximum advantage of qmlsc. In the first post we've set up the environment翻译 2022-07-13 19:31:50 · 722 阅读 · 0 评论 -
Qt6 QML Book/Qt Quick 3D/小结
Qt Quick 3D offers a rich way of integrating 3D contents into a Qt Quick scene, allowing a tight integration through QML.Qt Quick 3D提供了一种将3D内容集成到Qt Quick场景的丰富方法,允许通过QML进行紧密集成。When working with 3D contents, the most common approach is to work with assets cr翻译 2022-07-13 17:47:01 · 400 阅读 · 0 评论 -
Qt6 QML Book/Qt Quick 3D/混合2D和3D内容
Qt Quick 3D has been built to integrate nicely into the traditional Qt Quick used to build dynamic 2D contents.Qt Quick 3D已经构建,可以很好地集成到用于构建动态2D内容的传统Qt Quick中。It is straight forward to mix 3D contents into a 2D scene, as the element represents a 2D surface翻译 2022-07-13 17:38:51 · 643 阅读 · 0 评论 -
Qt6 QML Book/Qt Quick 3D/基础知识
In this section we will walk through the basics of Qt Quick 3D. This includes working with the built in shapes (meshes), using lights, and transformations in 3D.在本节中,我们将介绍Qt Quick 3D的基础知识。这包括使用内置形状(网格)、使用灯光和三维变换。A 3D scene consists of a few standard elemen翻译 2022-07-03 19:26:55 · 1535 阅读 · 0 评论 -
Qt6 QML Book/Qt Quick 3D/Qt Quick 3D
The Qt Quick 3D module takes the power of QML to the third dimension. Using Qt Quick 3D you can create three dimensional scenes and use the property bindings, state management, animations, and more from QML to make the scene interactive. You can even mix 2翻译 2022-06-29 14:50:39 · 398 阅读 · 0 评论 -
Qt6 QML Book/Qt for MCUs/小结
Summary小结In this chapter we've scratched the surface of Qt for MCUs and Qt Quick Ultralite. These technologies brings Qt to much smaller platforms and make it truly embeddable. Through-out this chapter, we've used the virtual desktop target, which allo翻译 2022-03-31 19:22:06 · 283 阅读 · 0 评论 -
Qt6 QML Book/Qt for MCUs/使用模型
Working with Models使用模型In Qt Quick Ultralite, it is possible to create models in QML using theListModelelement. It is also possible, and a bit more interesting, to create models from C++. This lets you expose lists of data from C++ to QML and to inst..翻译 2022-03-31 19:17:36 · 303 阅读 · 0 评论 -
Qt6 QML Book/Qt for MCUs/与C++的集成
Integrating with C++与C++的集成The C++In order to demonstrate the connection between C++ and QML in Qt for MCUs, we will create a simpleCountersingleton holding an integer value. Notice that we start from astructand not aclass. This is common practi...翻译 2022-03-31 18:22:50 · 423 阅读 · 1 评论 -
Qt6 QML Book/Qt for MCUs/Hello World - for MCUs
Hello World - for MCUsAs the setup of Qt for MCU can be a bit tricky, we will start with aHello Worldlike example to ensure that the toolchain works, and so that we can discuss the basic differences between Qt Quick Ultralite and standard Qt Quick.由于..翻译 2022-03-31 17:27:51 · 463 阅读 · 0 评论 -
Qt6 QML Book/Qt for MCUs/设置
Setup设置Qt for MCUscomes with support for a range of evaluation boards from companies such as NCP, Renesas, ST, and Infinion/Cypress. These are good for getting started and helps you try out the integration to the specific MCU. In the end, you will mos.翻译 2022-03-31 17:02:05 · 913 阅读 · 0 评论 -
Qt6 QML Book/Qt for MCUs/Qt for MCUs
Qt for MCUsNotice注意Qt for MCUs is not a part of the open source Qt distribution, but as a commercial add-on.Qt for MCU不是开源Qt发行版的一部分,而是一个商业附加组件。Qt for MCUs is a Qt version takes Qt for platforms that are too small to run Linux. Instead, Qt for M翻译 2022-03-31 16:51:29 · 675 阅读 · 0 评论 -
Qt6 QML Book/图形/小结
Summary小结In this chapter we're had a look at what the Qt Quick Shapes module has to offer. Using it we can create arbitrary shapes directly in QML, and leverage the property binding system of QML to create dynamic shapes. We've also had a look at the v翻译 2022-03-31 10:29:26 · 249 阅读 · 0 评论 -
Qt6 QML Book/图形/为形状设置动画
Animating Shapes为形状设置动画One of the nice aspects of using Qt Quick Shapes, is that the paths drawn are defined directly in QML. This means that their properties can be bound, transitioned and animated, just like any other property in QML.使用Qt Quick Sha翻译 2022-03-31 10:24:26 · 338 阅读 · 0 评论 -
Qt6 QML Book/图形/填充形状
Filling Shapes填充形状A shape can be filled in a number of different ways. In this section we will have a look at the general filling rule, and also the various ways a path can be filled.形状可以用多种不同的方式填充。在本节中,我们将了解一般填充规则,以及填充路径的各种方式。Qt Quick Shapes provi翻译 2022-03-31 10:14:40 · 932 阅读 · 0 评论 -
Qt6 QML Book/图形/构建路径
Building Paths构建路径As we saw in the last section, shapes are built from paths, which are built from path elements. The most common way to build a path is to close it, i.e. to ensure that it starts and ends in the same point. However, it is possible to c翻译 2022-03-25 10:54:09 · 512 阅读 · 0 评论 -
Qt6 QML Book/图形/基本形状
A Basic Shape基本形状The shape module lets you create arbitrarily paths and then stroke the outline and fill the interior. The definition of the path can be reused in other places where paths are used, e.g. for thePathViewelement used with models. But to..翻译 2022-03-25 10:33:20 · 300 阅读 · 0 评论 -
Qt6 QML Book/图形/快速入门
Quick Starter快速入门This chapter provides an overview of QML, the declarative user interface language used in Qt 6. We will discuss the QML syntax, which is a tree of elements, followed by an overview of the most important basic elements. Later we will br翻译 2022-03-21 16:28:51 · 751 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/小结
Summary小结In this chapter we have looked at the PySide6 module from the Qt for Python project. After a brief look at installation, we focused on how Qt concepts are used from Python. This included slots, signals and properties. We also looked at a basic翻译 2022-02-04 16:23:21 · 201 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/局限性
Limitations局限性At the moment, there are some things that are not easily available. One of them is that you cannot easily create QML plugins using Python. Instead you need to import the Python QML “modules” into your Python program and then use qmlRegist翻译 2022-02-04 16:20:47 · 185 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/构建应用程序
Building an Application构建应用程序In this chapter we will look at how you can combine Python and QML. The most natural way to combine the two worlds is to do as with C++ and QML, i.e. implement the logic in Python and the presentation in QML.在本章中,我们将介绍如何将翻译 2022-02-04 16:17:57 · 944 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/安装过程
Installing安装过程Qt for Python is available through PyPA usingpipunder the namepyside6. In the example below we setup avenvenvironment in which we will install the latest version of Qt for Python:PyPA使用名为pyside6的pip提供了用于Python的Qt。在下面的示例中,我们设置了一个ven...翻译 2022-02-04 08:50:57 · 531 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/介绍
Introduction介绍The Qt for Python project provides the tooling to bind C++ and Qt to Python, and a complete Python API to Qt. This means that everything that you can do with Qt and C++, you can also do with Qt and Python. This ranges from headless servic翻译 2022-02-04 08:41:39 · 371 阅读 · 0 评论 -
Qt6 QML Book/Qt for Python/Qt for Python
Qt for PythonPython的QtThis chapter describes the PySide6 module from the Qt for Python project. You will learn how to install it and how to leverage QML together with Python.本章介绍了Qt for Python项目中的PySide6模块。您将学习如何安装它,以及如何将QML与Python结合使用。...翻译 2022-02-04 08:31:06 · 196 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/小结
Summary小结The plugin created in thic chapter is a very simple plugin. but it can be re-used and extended by other types for different applications. Using plugins creates a very flexible solution. For example, you can now start the UI by just using theq.翻译 2022-02-03 21:58:56 · 408 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/使用FileIO
Using FileIO使用FileIONow we can use our newly created file to access some data. In this example, we will some city data in a JSON format and display it in a table. We build this as two projects: one for the extension plugin (calledfileio) which provide.翻译 2022-02-03 21:45:35 · 566 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/FileIO实现
FileIO ImplementationFileIO实现Remember theFileIOAPI we want to create should look like this.记住我们要创建的FileIO API应该是这样的。class FileIO : public QObject { ... Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) Q_PROPER..翻译 2022-02-03 20:20:45 · 302 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/创建插件
Creating the plugin创建插件Qt Creator contains a wizard to create aQtQuick 2 QML Extension Plugin, found underLibrarywhen creating a new project. We use it to create a plugin calledfileiowith aFileIOobject to start within the moduleorg.example.io....翻译 2022-02-03 19:57:09 · 708 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/插件内容
Plugin Content插件内容A plugin is a library with a defined interface, which is loaded on demand. This differs from a library as a library is linked and loaded on startup of the application. In the QML case, the interface is calledQQmlExtensionPlugin. Ther.翻译 2022-02-03 19:35:25 · 492 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/理解QML运行时
Understanding the QML Run-time理解QML运行时When running QML, it is being executed inside of a run-time environment. The run-time is implemented in C++ in theQtQmlmodule. It consists of an engine, responsible for the execution of QML, contexts, holding glo..翻译 2022-02-03 18:51:06 · 557 阅读 · 0 评论 -
Qt6 QML Book/扩展QML/用C++扩展QML
Extending QML with C++用C++扩展QMLCreating application using only QML can sometimes be limiting. The QML run-time is developed using C++, and the run-time environment can be extended, making it possible to make use of the full performance and freedom of t翻译 2022-02-03 17:46:28 · 295 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/C++中的模型
Models in C++C++中的模型One of the most common ways to integrate C++ and QML is throughmodels. Amodelprovides data to aviewsuch asListViews,GridView,PathViews, and other views which take a model and create an instance of a delegate for each entry i...翻译 2022-02-03 17:41:35 · 616 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/常见Qt类
Common Qt Classes常见Qt类Most Qt classes are derived from theQObjectclass. It encapsulates the central concepts of Qt. But there are many more classes in the framework. Before we continue looking at QML and how to extend it, we will look at some basic Q..翻译 2022-02-03 09:03:54 · 445 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/构建系统
Build Systems构建系统Building software reliably across different platforms can be a complex task. You will encounter different environments with different compilers, paths, and library variations. The purpose of Qt is to shield the application developer fr翻译 2022-02-03 09:03:39 · 561 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/The QObject
The QObjectAs described in the introduction, theQObjectis what enables mant of Qt's core functions such as signals and slots. This is implemented through introspection, which is whatQObjectprovides.QObjectis the base class of almost all classes in ...翻译 2022-02-02 15:16:54 · 406 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/样板应用程序
A Boilerplate ApplicationThe best way to understand Qt is to start from a small example. This application creates a simple"Hello World!"string and writes it into a file using Unicode characters.#include <QCoreApplication>#include <QString&..翻译 2022-02-02 14:58:17 · 522 阅读 · 0 评论 -
Qt6 QML Book/Qt C++/Qt与C++
Qt and C++Qt与C++Qt is a C++ toolkit with an extension for QML and Javascript. There exist many language bindings for Qt, but as Qt itself is developed in C++. The spirit of C++ can be found throughout the classes. In this section, we will look at Qt fr翻译 2022-02-02 13:04:53 · 796 阅读 · 0 评论 -
Qt6 QML Book/JavaScript/创建JS控制台
Creating a JS Console创建JS控制台As a little example, we will create a JS console. We need an input field where the user can enter his JS expressions and ideally there should be a list of output results. As this should more look like a desktop application w翻译 2022-02-02 12:05:04 · 410 阅读 · 0 评论 -
Qt6 QML Book/JavaScript/JS对象
JS ObjectsJS对象While working with JS there are some objects and methods which are more frequently used. This is a small collection of them.在使用JS时,有一些更常用的对象和方法。这是它们的一小部分。 Math.floor(v),Math.ceil(v),Math.round(v)- largest, smallest, rounded intege...翻译 2022-02-02 11:18:03 · 258 阅读 · 0 评论