当前位置:网站首页>QT creator create button
QT creator create button
2022-07-06 11:04:00 【it_ xiangqiang】
Qt Creator Create button
Create button
To create a button type :
Select File > Create a new file or project > Qt > QML file (Qt Quick 2) > Select to create a named Button.qml Of QML file ( for example ).
Be careful : Only if the file name begins with a capital letter , Types will be listed in the Library .
single click “ Design ” In the “ form editor ” Edit file .
stay “ Navigator ” in , choice “ project ”, And then in “ attribute ” Set the width of the button in the view (W) And height (H).
take “ rectangular ” from “ library ” Drag and drop Navigator Projects in China . This will create a nested project , Where the item is the parent of the rectangle . Items are placed relative to their parents .
stay “ attribute ” In the view , Modify the appearance of the rectangle :
In the color field , Select button color .
stay “ radius ” Field , Set the radius of the rectangle to fillet the button .
choice Layout, And then choose (Fill to Parent) The button anchors the rectangle to the item .
Drag and drop the text type to Navigator Projects in China .
stay “ attribute ” In the view , edit “ Text ” Properties of type .
In the text field , Input Button.
You can go to “ text color ” Select the text color in the field , And in “ typeface ” Select the font in the section , Size and style .
stay “ alignment ” Field , Select the center button to align the text with the center of the button .
choice “ Layout ” >“ Fill as parent ” To anchor the text to the entire button area .
Press Ctrl + S Save button .
To be useful , You must create a button type in the project . When you deal with others in the project QML Document thought UI When creating screens or other components , The button type will be displayed in the “ library ” View's “ my QML Components ” Tab . for example , You can use it to create button instances and modify their properties to assign useful ID, Change its appearance and set the button text for each button instance .
To create graphic buttons that scale beautifully without using vector graphics , Please use “ Border image ” type .
边栏推荐
- Other new features of mysql18-mysql8
- CSDN blog summary (I) -- a simple first edition implementation
- Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL flush operation
- [free setup] asp Net online course selection system design and Implementation (source code +lunwen)
- Solution: log4j:warn please initialize the log4j system properly
- CSDN问答标签技能树(一) —— 基本框架的构建
- API learning of OpenGL (2001) gltexgen
- MySQL主從複制、讀寫分離
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
猜你喜欢
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
Mysql23 storage engine
Navicat 导出表生成PDM文件
MySQL20-MySQL的数据目录
MySQL22-逻辑架构
Postman environment variable settings
Opencv uses freetype to display Chinese
Redis的基础使用
csdn-Markdown编辑器
Install mysql5.5 and mysql8.0 under windows at the same time
随机推荐
CSDN问答模块标题推荐任务(二) —— 效果优化
[reading notes] rewards efficient and privacy preserving federated deep learning
Copy constructor template and copy assignment operator template
虚拟机Ping通主机,主机Ping不通虚拟机
CSDN markdown editor
Yum prompt another app is currently holding the yum lock; waiting for it to exit...
Kubernetes - problems and Solutions
MySQL21-用戶與權限管理
Generate PDM file from Navicat export table
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
MySQL19-Linux下MySQL的安装与使用
CSDN问答标签技能树(五) —— 云原生技能树
MySQL主从复制、读写分离
MySQL18-MySQL8其它新特性
Swagger、Yapi接口管理服务_SE
安全测试涉及的测试对象
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
[Thesis Writing] how to write function description of jsp online examination system
Redis的基础使用
[BMZCTF-pwn] 11-pwn111111