当前位置:网站首页>[QT] qtcreator shortcut key and QML introduction
[QT] qtcreator shortcut key and QML introduction
2022-06-25 08:15:00 【Cappuccino-jay】
In easy-to-use systems and professional systems , Shortcut keys are different . As a professional developer , You may Will spend a lot of time on your app , Every shortcut key can improve your work efficiency .Qt Creator So do the developers of , And many shortcut keys have been added to the application .
- Ctrl+B - Build the project
- Ctrl+R - Run the project
- Ctrl+Tab - Switch open documents
- Ctrl+k - Open locator
- Esc - return
- F2 - Find the corresponding symbol explanation .
- F4 - Switch between header file and source file ( Only right c++ Code effective )
- F1 - View help documents
QML grammar (QML Syntax)
QML Is a declarative language that describes the user interface . It breaks down the user interface into smaller elements , this Some elements can be combined into a component .QML Language describes the shape and behavior of user interface elements . User community Face can be used JavaScript To provide decoration , Or add more complex logic . From this point of view it follow HTML-JavaScript Pattern , but QML Is designed to describe the user interface , Not text files .
from QML The simplest way to learn is to understand the hierarchy of elements . The child element inherits the coordinates from the parent element System , its x,y The coordinate always corresponds to its parent element coordinate system .
import Declare that a specified module version is imported . Generally speaking, it will import QtQuick2.0 As the beginning A reference to an initial element .
Use // You can comment on a single line , Use /**/ You can comment on multiple lines , It's like C/C++ and JavaScript equally .
every last QML All files need a root element , It's like HTML equally .
An element uses its type declaration , And then use {} To include .
Elements have attributes , They followed name:value The format of .
Any in QML All elements in the document can use their id Visit (id Is an arbitrary identifier operator ).
Elements can be nested , This means that a parent element can have multiple child elements . Child elements can be accessed through ask parent Keyword to access their parent elements .
Suggest
You will often use id Or keywords parent To access your parent object . A better way is to name Your root element object id by root(id:root), So you don't have to think about your QML The root element in the document How should we name it .
边栏推荐
- FM signal, modulated signal and carrier
- Overview of image super score: the past and present life of image super score in a single screen (with core code)
- 【补题】2021牛客暑期多校训练营1-3
- c#中设置lable控件的TextAlign属性控制文字居中的方法
- CVPR 2022 Oral 2D图像秒变逼真3D物体
- June training (day 25) - tree array
- 洛谷P6822 [PA2012]Tax(最短路+边变点)
- 双周投融报:资本埋伏Web3基础设施
- Dietary intervention reduces cancer treatment-related symptoms and toxicity
- 深度学习系列48:DeepFaker
猜你喜欢

Can transparent cloud gateway caniot and candtu record can messages and send and receive can data remotely

什么是SKU和SPU,SKU,SPU的区别是什么

Matlab代码格式一键美化神器

使用apt-get命令如何安装软件?

时钟刻度盘的绘制

力扣 272. 最接近的二叉搜索树值 II 递归

Electronics: Lesson 013 - Experiment 14: Wearable pulsed luminaries

Log in to MySQL 5.7 under ubuntu18 and set the root password

Debugging mipi-dsi screen based on stm32mp157

420 sequence traversal of binary tree 2 (429. sequence traversal of n-ary tree, 515. find the maximum value in each tree row, 116. fill in the next right node pointer of each node, 104. maximum depth
随机推荐
【莫比乌斯反演】
Sword finger offer (simple level)
线程+线程问题记录
Anaconda based module installation and precautions
C # set up FTP server and realize file uploading and downloading
Looking for b-end product manager after years? I almost ruined myself
FFT【模板】
电子学:第012课——实验 13:烧烤 LED
c#中设置lable控件的TextAlign属性控制文字居中的方法
Functions should not specify operation types through variables
Drawing of clock dial
Electronics: Lesson 010 - Experiment 8: relay oscillator
Mr. Tang's lecture on operational amplifier (Lecture 7) -- Application of operational amplifier
Luogu p1073 [noip2009 improvement group] optimal trade (layered diagram + shortest path)
电子学:第010课——实验 8:继电振荡器
LeetCode_ Hash table_ Medium_ 454. adding four numbers II
Electronics: Lesson 010 - Experiment 9: time and capacitors
Apache CouchDB Code Execution Vulnerability (cve-2022-24706) batch POC
Authority design of SaaS system based on RBAC
CVPR 2022 oral 2D images become realistic 3D objects in seconds