当前位置:网站首页>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 :
边栏推荐
- Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
- I didn't cancel
- Record the errors reported when running fluent in the simulator
- Go home early today
- P3402 persistent and searchable
- Redis master-slave synchronization, clustering, persistence
- CMD implements the language conversion of locale non Unicode programs
- 第一章:三位阶乘和数,图形点扫描
- Analysis of dart JSON encoder and decoder
- Day11 - my page, user information acquisition, modification and channel interface
猜你喜欢
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
01 - QT OpenGL display OpenGL window
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
Chapter 20: y= sin (x) /x, rambling coordinate system calculation, y= sin (x) /x with profile graphics, Olympic rings, ball rolling and bouncing, water display, rectangular optimization cutting, R que
How to build an efficient information warehouse
Flutter network and data storage framework construction-b1
Common text labels
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
PR FAQ: how to set PR vertical screen sequence?
2022-06-27 advanced network engineering (XII) IS-IS overhead type, overhead calculation, LSP processing mechanism, route revocation, route penetration
随机推荐
Pecan — Overview
Detailed explanation of shuttle unity interworking principle
[leetcode] [SQL] notes
OSPF - detailed explanation of stub area and full stub area
Sentinel source code analysis part II - sentinel dashboard console startup and configuration
Summary of 90 day learning materials and notes of Zhang Fei's actual electronic hardware engineer
交叉编译Opencv带Contrib
第一章:求奇因数代数和,求同吗小数和s(d, n),简化同码小数和s(d, n),拓广同码小数和s(d, n)
Use unique_ PTR forward declaration? [repetition] - forward declaration with unique_ ptr? [duplicate]
Zhang Fei hardware 90 day learning notes - personal record of day 3, please see my personal profile / homepage for the complete
Read the paper glodyne global topology preserving dynamic network embedding
Php based campus lost and found platform (automatic matching push)
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
10 smart contract developer tools that miss and lose
QT -- qfileinfo file information reading
2022-06-30 advanced network engineering (XIV) routing strategy - matching tools [ACL, IP prefix list], policy tools [filter policy]
Chapter 1: extend the same code decimal sum s (D, n)
CMD implements the language conversion of locale non Unicode programs
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
Record the errors reported when running fluent in the simulator