当前位置:网站首页>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 .
边栏推荐
- Moteur de stockage mysql23
- 图片上色项目 —— Deoldify
- Ansible practical series I_ introduction
- windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
- A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
- 打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
- IDEA 导入导出 settings 设置文件
- MySQL20-MySQL的数据目录
- CSDN博文摘要(一) —— 一个简单的初版实现
- 解决:log4j:WARN Please initialize the log4j system properly.
猜你喜欢
Breadth first search rotten orange
La table d'exportation Navicat génère un fichier PDM
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Asp access Shaoxing tourism graduation design website
[reading notes] rewards efficient and privacy preserving federated deep learning
Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
解决:log4j:WARN Please initialize the log4j system properly.
Did you forget to register or load this tag 报错解决方法
02-项目实战之后台员工信息管理
Win10: how to modify the priority of dual network cards?
随机推荐
CSDN Q & a tag skill tree (V) -- cloud native skill tree
记某公司面试算法题:查找一个有序数组某个数字出现的次数
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
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Basic use of redis
Kubesphere - deploy the actual combat with the deployment file (3)
Development of C language standard
[Thesis Writing] how to write function description of jsp online examination system
Opencv uses freetype to display Chinese
CSDN问答模块标题推荐任务(二) —— 效果优化
Mysql21 - gestion des utilisateurs et des droits
Mysql23 storage engine
Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
Win10: how to modify the priority of dual network cards?
安装numpy问题总结
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
Mysql28 database design specification
CSDN markdown editor
windows下同时安装mysql5.5和mysql8.0