Qt in LineEdit Reading text, numbers, etc , In fact, this is not limited to LineEdit Control in the text, numbers, etc , It can be SpinBox Reading of
, Now it works for two .

Before that, it was in LineEdit Read in the data I want , Now it is based on the needs of this project , Be able to UI
Make changes at any time , So it was used SpinBox, Read it , This time LineEdit To tell , Everything else is the same , It's just more functional

This is just a feature , We won't open up another slot function , The code is simple , I will tell you how to know that you have successfully read it .

1.ui Drag up LineEdit control

Define attribute name T_pix and T——pix1


Now I'm sure I'm curious about how that number came from ? In fact, it is changed in the property page , Default input

You should know by reading English , At that time, I was still thinking about how to let him acquiesce , Now it's all in here ( This principle is not limited to this control , Other controls also have corresponding default settings )

With these foundations , Here is how to write the key code , I'll just take a screenshot , It will be more clear , The code is given below

See this label , Maybe you can see something , This is what I talked about in a blog about changing pixels , It's still flowers here T word , It's just easier to modify ( I'll talk about it next ), It's more casual .

The code is also posted , Not all of them , Post the most important paragraph of the theme here , To be exact, it is a sentence , I'll add one more .

Here we should think about why there is one more sentence below . Yes, of course , It's not much here , That's a lot for the whole code , But for us to write , It's not much to do a verification , The following sentence is mainly to verify whether a read is successful . Automatically add after reading 1

Last blog content , Refer to


©2019-2020 Toolsou All rights reserved,
【 Explain in detail 】 Interview must ask :SpringBoot Automatic configuration principle 【 Hyper detail 】Java Realization of student information management system 2020 The 11th National Blue Bridge Cup Python group JavaScript note ( five )---- Branch statement MYSQL database SQL Sentence practice experiment EXERCISES. 1 SIMPLE COMMANDSMySQL Basics Commonly used sentence ( Add / delete / modify query )C++ of string of compare usage vue limit input Only positive numbers can be entered C Language of a Gobang game implementation Programmer refused due to low salary offer,HR become shame , Netizens instantly blew up ..