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,
One is called “ Asking for the train ” A small village Finally got the train Spring Boot Lesson 16 :SpringBoot Implementation of multithreading with injection class Chrome OS, For programmers and Windows What does it mean ? Internet Marketing JAVA Convert a string to a numeric type I've been drinking soft water for three years ? What is the use of soft water and water softener You don't know ——HarmonyOS Talking about uni-app Page value transfer problem JavaScript Medium Call and ApplySparkSQL Achieve partition overlay write Character recognition technology of vehicle license plate based on Neural Network