当前位置:网站首页>[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 .
边栏推荐
- Neural network and deep learning-3-simple example of machine learning pytorch
- Drawing of clock dial
- 2022年毕业生求职找工作青睐哪个行业?
- Functions should not specify operation types through variables
- 双周投融报:资本埋伏Web3基础设施
- STM32CubeMX 学习(5)输入捕获实验
- RMQ interval maximum subscript query, interval maximum
- Bat start NET Core
- TCP MIN_RTO 辩证考
- 【补题】2021牛客暑期多校训练营1-3
猜你喜欢
STM32CubeMX 学习(5)输入捕获实验
Anaconda based module installation and precautions
电子学:第014课——实验 15:防入侵报警器(第一部分)
Sword finger offer (medium level)
Looking for b-end product manager after years? I almost ruined myself
Electronics: Lesson 010 - Experiment 9: time and capacitors
Mr. Tang's lecture on operational amplifier (Lecture 7) -- Application of operational amplifier
How do I install the software using the apt get command?
To understand the difference between Gram-positive and Gram-negative bacteria and the difference in pathogenicity
Apache CouchDB Code Execution Vulnerability (cve-2022-24706) batch POC
随机推荐
Free SSL certificate acquisition tutorial
Stm32cubemx learning (5) input capture experiment
In 2022, which industry will graduates prefer when looking for jobs?
How do I install the software using the apt get command?
电子学:第010课——实验 9:时间与电容器
Determine whether the user is entering a page for the first time
Mr. Tang's lecture on operational amplifier (Lecture 7) -- Application of operational amplifier
飞机引气系统的建模与故障仿真
洛谷P2048 [NOI2010] 超级钢琴(RMQ+优先队列)
C examples of using colordialog to change text color and fontdialog to change text font
[red flag Cup] Supplementary questions
深度学习系列48:DeepFaker
函数尽量不要通过变量指定操作类型
Electronics: Lesson 013 - Experiment 14: Wearable pulsed luminaries
Overview of image super score: the past and present life of image super score in a single screen (with core code)
Biweekly investment and financial report: capital ambush Web3 infrastructure
电子学:第014课——实验 15:防入侵报警器(第一部分)
Set the textalign property of the label control in C to control the method of text centering
bat启动.NET Core
Remove headers from some pages in a word document