Kirigami 新手入門
這個解說會導引您走過使用 Kirigami 框架 建立您自己的響應式應用程式的過程。一個「響應式應用程式」在此情境下指的是不管人們使用什麼裝置,都能夠輕易地使用該應用程式——在桌面上符合大螢幕與鍵盤滑鼠的使用;在手機上接受觸控螢幕的輸入並符合較小的垂直螢幕等等。
Kirigami 建基於 Qt 專案所提供的 QML 語言與 Qt Quick Controls 2 元件庫上。QML 有對於觸控系統的內建支援,讓它適合行動版應用程式使用。Qt Quick 元件是我們建構應用程式介面時能夠重複使用的視覺項目。Kirigami 是設計來方便建立響應式應用程式的 Qt Quick 元件集合。
While you will use QML to create the visual part of your application, the business logic—the code that does the heavy lifting for your application's functionality—should be written in a different language. We will also explore how to integrate our business logic with our UI in the tutorials below.
First, you will need to set up a new project in a language of your choice. The introduction will show you how to make a small, but functional Kirigami application.
You will be shown the basics of how to deal with colors and text in your application, and you will get acquainted with most QML components. Next, you will get acquainted with most of the QML components you might want to use and how they look like. This section won't touch any business logic at all, only QML code.
You will get a deep dive into more advanced topics that concern manipulating the data that will be shown in your program.
Lastly, you will be presented with Kirigami Addons, a series of quality-of-life components that you can use to, among other things, design the Settings of your application.