当前位置:网站首页>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 .
边栏推荐
- Ubuntu 20.04 安装 MySQL
- CSDN markdown editor
- [reading notes] rewards efficient and privacy preserving federated deep learning
- 一键提取pdf中的表格
- [Thesis Writing] how to write function description of jsp online examination system
- Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL的一些随笔记录
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Ansible实战系列二 _ Playbook入门
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
猜你喜欢

Generate PDM file from Navicat export table

How to change php INI file supports PDO abstraction layer

A trip to Macao - > see the world from a non line city to Macao

MySQL20-MySQL的数据目录

IDEA 导入导出 settings 设置文件

Windows下安装MongDB教程、Redis教程

引入了junit为什么还是用不了@Test注解

CSDN Q & a tag skill tree (V) -- cloud native skill tree

【博主推荐】C# Winform定时发送邮箱(附源码)

Swagger、Yapi接口管理服务_SE
随机推荐
MySQL18-MySQL8其它新特性
项目实战-后台员工信息管理(增删改查登录与退出)
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
Windows下安装MongDB教程、Redis教程
Have you mastered the correct posture of golden three silver four job hopping?
Invalid global search in idea/pychar, etc. (win10)
报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
SSM integrated notes easy to understand version
How to change php INI file supports PDO abstraction layer
Mysql22 logical architecture
Ansible实战系列三 _ task常用命令
Postman Interface Association
Install MySQL for Ubuntu 20.04
Win10: how to modify the priority of dual network cards?
Other new features of mysql18-mysql8
csdn-Markdown编辑器
Breadth first search rotten orange
JDBC principle
MySQL完全卸载(Windows、Mac、Linux)
A trip to Macao - > see the world from a non line city to Macao