当前位置:网站首页>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 .
边栏推荐
- Solution: log4j:warn please initialize the log4j system properly
- Copy constructor template and copy assignment operator template
- 图片上色项目 —— Deoldify
- Django运行报错:Error loading MySQLdb module解决方法
- A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
- API learning of OpenGL (2002) smooth flat of glsl
- PyCharm中无法调用numpy,报错ModuleNotFoundError: No module named ‘numpy‘
- 打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
- Copie maître - esclave MySQL, séparation lecture - écriture
- ++Implementation of I and i++
猜你喜欢
Moteur de stockage mysql23
CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
[recommended by bloggers] C # generate a good-looking QR code (with source code)
Why is MySQL still slow to query when indexing is used?
[Thesis Writing] how to write function description of jsp online examination system
Other new features of mysql18-mysql8
Did you forget to register or load this tag 报错解决方法
一键提取pdf中的表格
Data dictionary in C #
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
随机推荐
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
安全测试涉及的测试对象
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
Why is MySQL still slow to query when indexing is used?
Ansible practical Series II_ Getting started with Playbook
Generate PDM file from Navicat export table
虚拟机Ping通主机,主机Ping不通虚拟机
Windows cannot start the MySQL service (located on the local computer) error 1067 the process terminated unexpectedly
Idea import / export settings file
[recommended by bloggers] C WinForm regularly sends email (with source code)
[BMZCTF-pwn] 12-csaw-ctf-2016-quals hungman
Mysql22 logical architecture
Remember the interview algorithm of a company: find the number of times a number appears in an ordered array
Ansible practical series I_ introduction
一键提取pdf中的表格
CSDN问答标签技能树(二) —— 效果优化
Breadth first search rotten orange
连接MySQL数据库出现错误:2059 - authentication plugin ‘caching_sha2_password‘的解决方法
The virtual machine Ping is connected to the host, and the host Ping is not connected to the virtual machine
[BMZCTF-pwn] 11-pwn111111