当前位置:网站首页>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] 12-csaw-ctf-2016-quals hungman
- frp内网穿透那些事
- Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL20-MySQL的数据目录
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Timestamp with implicit default value is deprecated error in MySQL 5.6
- MySQL other hosts cannot connect to the local database
- 解决扫描不到xml、yml、properties文件配置
- Basic use of redis
- Opencv uses freetype to display Chinese
猜你喜欢
CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
MySQL 20 MySQL data directory
一键提取pdf中的表格
MySQL18-MySQL8其它新特性
【博主推荐】C# Winform定时发送邮箱(附源码)
Postman uses scripts to modify the values of environment variables
How to change php INI file supports PDO abstraction layer
LeetCode #461 汉明距离
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
随机推荐
Breadth first search rotten orange
Invalid global search in idea/pychar, etc. (win10)
引入了junit为什么还是用不了@Test注解
CSDN问答标签技能树(五) —— 云原生技能树
图片上色项目 —— Deoldify
CSDN问答标签技能树(一) —— 基本框架的构建
Postman uses scripts to modify the values of environment variables
[recommended by bloggers] C # generate a good-looking QR code (with source code)
Principes JDBC
Mysql26 use of performance analysis tools
TCP/IP协议(UDP)
Postman environment variable settings
CSDN markdown editor
Timestamp with implicit default value is deprecated error in MySQL 5.6
MySQL19-Linux下MySQL的安装与使用
CSDN question and answer tag skill tree (I) -- Construction of basic framework
Ansible practical series I_ introduction
CSDN博文摘要(一) —— 一个简单的初版实现
MySQL flush operation
MySQL主从复制、读写分离