当前位置:网站首页>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 .
边栏推荐
- [BMZCTF-pwn] 11-pwn111111
- A trip to Macao - > see the world from a non line city to Macao
- Global and Chinese market of operational amplifier 2022-2028: Research Report on technology, participants, trends, market size and share
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
- Kubesphere - deploy the actual combat with the deployment file (3)
- 引入了junit为什么还是用不了@Test注解
- windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
- Installation and use of MySQL under MySQL 19 Linux
- Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
- IDEA 导入导出 settings 设置文件
猜你喜欢
【博主推荐】C# Winform定时发送邮箱(附源码)
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
MySQL 20 MySQL data directory
Mysql23 storage engine
[reading notes] rewards efficient and privacy preserving federated deep learning
CSDN问答标签技能树(五) —— 云原生技能树
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
连接MySQL数据库出现错误:2059 - authentication plugin ‘caching_sha2_password‘的解决方法
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
随机推荐
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
C语言标准的发展
Breadth first search rotten orange
JDBC principle
NPM an error NPM err code enoent NPM err syscall open
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
自动机器学习框架介绍与使用(flaml、h2o)
CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
Solution: log4j:warn please initialize the log4j system properly
MySQL21-用戶與權限管理
Ansible实战系列二 _ Playbook入门
MySQL的一些随笔记录
Install MySQL for Ubuntu 20.04
35 is not a stumbling block in the career of programmers
[BMZCTF-pwn] 11-pwn111111
Mysql21 user and permission management
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Postman environment variable settings
Timestamp with implicit default value is deprecated error in MySQL 5.6