当前位置:网站首页>Part 27 supplement (27) buttons of QML basic elements
Part 27 supplement (27) buttons of QML basic elements
2022-07-03 19:29:00 【Embedded workplace】
1、Button
The button trigger process is : When the button is clicked , Will trigger the signal clicked() The signal ;
Execution process : Then the response slot function onClicked;
Before using the button, you need to add :
import QtQuick.Controls 1.2
example 1:
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 1.2
Window
{
visible: true
width: 600
height: 400
Rectangle {
anchors.centerIn: parent
width: 300
height: 300
color: "red"
Button {
text: " sign out " // Specify the button text
anchors.centerIn: parent
onClicked: {
Qt.quit()
}
}
}
}
Result display :
边栏推荐
- [water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
- How does if ($variable) work? [repeat] - how exactly does if ($variable) work? [duplicate]
- BOC protected tryptophan zinc porphyrin (Zn · TAPP Trp BOC) / copper porphyrin (Cu · TAPP Trp BOC) / cobalt porphyrin (cobalt · TAPP Trp BOC) / iron porphyrin (Fe · TAPP Trp BOC) / Qiyue supply
- 03 -- QT OpenGL EBO draw triangle
- Thinking about festivals
- Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
- Day_ 18 IO stream system
- EGO Planner代码解析bspline_optimizer部分(3)
- Chapter 1: simplify the same code decimal sum s (D, n)
- 04 -- QT OpenGL two sets of shaders draw two triangles
猜你喜欢
Driveseg: dynamic driving scene segmentation data set
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
The necessity of lean production and management in sheet metal industry
Summary of composition materials for 2020 high-frequency examination center of educational resources
BUUCTF
2022.2.14 Li Kou - daily question - single element in an ordered array
Recommend a GIF processing artifact less than 300K - gifsicle (free download)
BOC protected tryptophan porphyrin compound (TAPP Trp BOC) Pink Solid 162.8mg supply - Qiyue supply
【LeetCode】【SQL】刷题笔记
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
随机推荐
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
We have built an intelligent retail settlement platform
Zhang Fei hardware 90 day learning notes - personal record on day 6. Please see my personal profile / homepage for the complete record
Strict data sheet of new features of SQLite 3.37.0
Chapter 2: find the number of daffodils based on decomposition, find the number of daffodils based on combination, find the conformal number in [x, y], explore the n-bit conformal number, recursively
Day18 - basis of interface testing
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
Yolov3 network model building
Cross compile opencv with contrib
Luogu-p1107 [bjwc2008] Lei Tao's kitten
2022-06-30 网工进阶(十四)路由策略-匹配工具【ACL、IP-Prefix List】、策略工具【Filter-Policy】
Basic principle of LSM tree
2022-06-25 advanced network engineering (XI) IS-IS synchronization process of three tables (neighbor table, routing table, link state database table), LSP, cSNP, psnp, LSP
Ego planner code parsing Bspline_ Optimizer section (3)
2022-06-30 網工進階(十四)路由策略-匹配工具【ACL、IP-Prefix List】、策略工具【Filter-Policy】
Chapter 1: find the algebraic sum of odd factors, find the same decimal sum s (D, n), simplify the same code decimal sum s (D, n), expand the same code decimal sum s (D, n)
Thinking about festivals
Merge K ascending linked lists
Valentine's Day - make an exclusive digital collection for your lover
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]