当前位置:网站首页>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 .
边栏推荐
- 图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
- Swagger、Yapi接口管理服务_SE
- 【博主推荐】asp.net WebService 后台数据API JSON(附源码)
- MySQL completely uninstalled (windows, MAC, Linux)
- 连接MySQL数据库出现错误:2059 - authentication plugin ‘caching_sha2_password‘的解决方法
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
- 项目实战-后台员工信息管理(增删改查登录与退出)
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
- JDBC原理
猜你喜欢
LeetCode #461 汉明距离
Postman environment variable settings
Basic use of redis
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
Leetcode 461 Hamming distance
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
Mysql26 use of performance analysis tools
Copie maître - esclave MySQL, séparation lecture - écriture
Invalid global search in idea/pychar, etc. (win10)
随机推荐
Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
Mysql25 index creation and design principles
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
图片上色项目 —— Deoldify
NPM an error NPM err code enoent NPM err syscall open
Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis
35 is not a stumbling block in the career of programmers
[Li Kou 387] the first unique character in the string
Leetcode 461 Hamming distance
Mysql23 storage engine
[recommended by bloggers] C # generate a good-looking QR code (with source code)
The virtual machine Ping is connected to the host, and the host Ping is not connected to the virtual machine
Development of C language standard
npm一个错误 npm ERR code ENOENT npm ERR syscall open
Kubesphere - deploy the actual combat with the deployment file (3)
@controller,@service,@repository,@component区别
Other new features of mysql18-mysql8
Generate PDM file from Navicat export table
1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration