当前位置:网站首页>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 .
边栏推荐
- 【博主推荐】SSM框架的后台管理系统(附源码)
- Opencv uses freetype to display Chinese
- February 13, 2022-2-climbing stairs
- A trip to Macao - > see the world from a non line city to Macao
- Postman Interface Association
- Solve the problem that XML, YML and properties file configurations cannot be scanned
- Timestamp with implicit default value is deprecated error in MySQL 5.6
- API learning of OpenGL (2004) gl_ TEXTURE_ MIN_ FILTER GL_ TEXTURE_ MAG_ FILTER
- CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
- Mysql 其他主机无法连接本地数据库
猜你喜欢

LeetCode #461 汉明距离

A trip to Macao - > see the world from a non line city to Macao
![[free setup] asp Net online course selection system design and Implementation (source code +lunwen)](/img/ac/b518796a92d00615cd374c0c835f38.jpg)
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)

MySQL18-MySQL8其它新特性

Redis的基础使用

Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
![[C language foundation] 04 judgment and circulation](/img/59/4100971f15a1a9bf3527cbe181d868.jpg)
[C language foundation] 04 judgment and circulation

A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon

基于apache-jena的知识问答

【博主推荐】C#生成好看的二维码(附源码)
随机推荐
Install mysql5.5 and mysql8.0 under windows at the same time
Development of C language standard
Swagger, Yapi interface management service_ SE
MySQL19-Linux下MySQL的安装与使用
解决扫描不到xml、yml、properties文件配置
Basic use of redis
Moteur de stockage mysql23
MySQL master-slave replication, read-write separation
Windows下安装MongDB教程、Redis教程
记某公司面试算法题:查找一个有序数组某个数字出现的次数
[reading notes] rewards efficient and privacy preserving federated deep learning
【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
Postman uses scripts to modify the values of environment variables
Are you monitored by the company for sending resumes and logging in to job search websites? Deeply convinced that the product of "behavior awareness system ba" has not been retrieved on the official w
[leectode 2022.2.13] maximum number of "balloons"
There are three iPhone se 2022 models in the Eurasian Economic Commission database
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
CSDN question and answer tag skill tree (I) -- Construction of basic framework
SSM integrated notes easy to understand version
导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法