当前位置:网站首页>[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 .
边栏推荐
- Electronics: Lesson 008 - Experiment 6: very simple switches
- 电子学:第011课——实验 10:晶体管开关
- 现在通过开户经理发的开户链接股票开户安全吗?
- c#磁盘驱动器及文件夹还有文件类的操作
- socket问题记录
- C disk drives, folders and file operations
- 每日刷题记录 (三)
- 【莫比乌斯反演】
- allgero报错:Program has encountered a problem and must exit. The design will be saved as a .SAV file
- 洛谷P5994 [PA2014]Kuglarz(异或思维+MST)
猜你喜欢

Wechat applet opening customer service message function development

自制坡道,可是真的很香

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

Authority design of SaaS system based on RBAC

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

测一测现在的温度

Mining microbial dark matter -- a new idea

Deep learning series 45: overview of image restoration

Opencv minimum filtering (not limited to images)

Application of can optical transceiver of ring network redundant can/ optical fiber converter in fire alarm system
随机推荐
洛谷P1073 [NOIP2009 提高组] 最优贸易(分层图+最短路)
2021ICPC网络赛第一场
Ph中和过程建模
[supplementary question] 2021 Niuke summer multi school training camp 6-n
[supplementary question] 2021 Niuke summer multi school training camp 4-N
Wechat applet introduction record
【补题】2021牛客暑期多校训练营9-n
Pychart's wonderful setting: copy immediately after canceling the comment and bring #
What is the difference between agreement and service?
[supplementary question] 2021 Niuke summer multi school training camp 9-N
【补题】2021牛客暑期多校训练营6-n
双周投融报:资本埋伏Web3基础设施
Looking for b-end product manager after years? I almost ruined myself
Drawing of clock dial
Luogu p6822 [pa2012]tax (shortest circuit + edge change point)
FM信号、调制信号和载波
每日刷题记录 (三)
First experience Amazon Neptune, a fully managed map database
TCP 加速小记
Allgero reports an error: program has encoded a problem and must exit The design will be saved as a . SAV file