当前位置:网站首页>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 .
边栏推荐
- MySQL22-逻辑架构
- Global and Chinese markets for aprotic solvents 2022-2028: Research Report on technology, participants, trends, market size and share
- JDBC principle
- February 13, 2022-2-climbing stairs
- 02-项目实战之后台员工信息管理
- ++Implementation of I and i++
- PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
- MySQL主從複制、讀寫分離
- SSM integrated notes easy to understand version
- Install MySQL for Ubuntu 20.04
猜你喜欢
How to change php INI file supports PDO abstraction layer
[Thesis Writing] how to write function description of jsp online examination system
Mysql23 storage engine
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
Did you forget to register or load this tag 报错解决方法
图片上色项目 —— Deoldify
Mysql28 database design specification
Navicat 導出錶生成PDM文件
一键提取pdf中的表格
Installation and use of MySQL under MySQL 19 Linux
随机推荐
[ahoi2009]chess Chinese chess - combination number optimization shape pressure DP
Windows下安装MongDB教程、Redis教程
Install mysql5.5 and mysql8.0 under windows at the same time
Ansible practical series I_ introduction
Generate PDM file from Navicat export table
Yum prompt another app is currently holding the yum lock; waiting for it to exit...
Ubuntu 20.04 安装 MySQL
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
[recommended by bloggers] C MVC list realizes the function of adding, deleting, modifying, checking, importing and exporting curves (with source code)
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Moteur de stockage mysql23
Mysql21 - gestion des utilisateurs et des droits
【博主推荐】C# Winform定时发送邮箱(附源码)
MySQL flush operation
Mysql25 index creation and design principles
报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
Postman environment variable settings
La table d'exportation Navicat génère un fichier PDM
MySQL19-Linux下MySQL的安装与使用
Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis