1.setupUi(this) : setupUi(this) By .ui File generated class constructor This function initializes the interface It's according to what we're doing here Qt Draw the form as it is designed in the designer

setupUi(this) Will automatically match on_objectName_signalName() Named arbitrary slot and corresponding objectName Of signalName() come together . namely

void GoToCellDialog::on_lineEdit_textChanged()
{
okButton->setEnabled(lineEdit->hasAcceptableInput());
}

Implicit in the above code is :

connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(on_lineEdit_textChanged()));

2.

QRegExp regExp("[A-Za-z][1-9][0-9]{0,2}");
lineEdit->setValidator(new QRegExpValidator(regExp, this));

Set the checker to limit the input range . There are three built-in testers :QIntValidator、QDoubleValidator、QRegExpValidator.
QRegExpValidator With a regular expression [A-Za-z][1-9][0-9]{0,2} Express , Allow a uppercase or lowercase letter , Followed by a 1-9 The number of , I'll talk to you later 0、1、2 individual 0-9 The number of .

3. In class slots、signals when , Class starts by declaring Q_OBJECT There's no semicolon

【Qt】 Learning notes ( One ) More articles about

  1. qt Learning notes ( 5、 ... and ) QGraphicsPixmapItem And QGraphicsScene Programming examples of Icon drag gradient effect

    At your request , Or the whole project File it out , Let's save something :http://www.kuaipan.cn/file/id_48923272389086450.htm Let's see how it works , I use mass creation 7 Inch screen ...

  2. Qt Learning notes -Widget Layout management

    Qt Learning notes 4-Widget Layout management       With <C++ GUI Programming with Qt 4, Second Edition> For reference example : Find dialog It contains three files ,f ...

  3. qt Learning notes ( 7、 ... and ) Introduction to the database of ( List of all supported database types )

    I recently used Qt Write the attendance machine of the company . The original requirement was based on frameBuffer Under the use of their own development easyGUI To develop the upper application , But considering that easyGUI There are not many interfaces available , Just consider using Qt To develop , By the way . No nonsense ...

  4. Qt Learning notes (1) hello world

    Qt An introduction to the : Qt It's a cross platform C++ GUI Library implementation , I thought it only provided some graphical interfaces , It seems that I underestimated it , Adoption of documentation Qt Way of learning 2 Begin to learn , I don't know if this document is a little old , What about him , Let's get to know . Set up the environment : ...

  5. 【Qt Learning notes 】Qt+VS2010 Configuration of

    http://blog.csdn.net/jocyln9026/article/details/8575218 About Qt Qt yes 1991 Year by year Trolltech The company developed a cross platform C++ The GUI should ...

  6. QT Learning notes 1

    No backup MFC 了 , Want to switch to QT. So follow a note on the Internet . 1 The development environment is VS2008+QT4.7+VassistX See this post for specific configuration :http://qimo601.iteye.com/blo ...

  7. QT Learning notes ( One )——ui The understanding of

    ////////////2015/08/06/////////////////// ///////////by xbw////////////////////////// ////////// Environmental Science  Q ...

  8. 【Qt Learning notes 】 Window assembly finishing

    About Qt In the window part study Start today Qt The widget for , Take a look at Qt The magic of , Remember 2012 The winter of that year , I'm still learning Java Well , Now it's basically the same as Java Say goodbye , But for embedded development Qt It's important , I want to take advantage of ...

  9. Qt Learning notes ListWidget Addition, deletion and modification of

    I learned a little ListWidget Use of control , Add, delete and modify a small function First decompose the code and finally give the complete code Add a ListWidget One Horizontal Specer and   Three PushButton ...

  10. Qt Learning notes -1 Development environment establishment

    About Qt I don't give too much introduction here , There are a few things that attract me : 1. use C++ development language : 2. Multi platform (wWindows.MAC.Linux.Android etc. ): 3. What you see and what you get from the interface . Others can be found on Baidu : Starting from this article ...

Random recommendation

  1. PHP Play wechat public platform custom interface

    After opening a custom reply from wechat public platform , I have been focusing on wechat interface , Would like to use custom reply to do a webmaster tool query , for example PR Inquire about , Record and inquiry, etc , Enter the URL information , You can get it automatically PR, Access to record information , It should be a good idea . But with ...

  2. adopt ipv6 visit g o o g l e

    Google.Youtube.Facebook And so on IPv6 visit ,IPv4 Most of the users on the Internet can't access it , such as Gmail,Google Docs And all kinds of related services . Most of these websites have been accessed IPv6 The Internet , because ...

  3. 【 Reprint 】C/C++ in #ifdef and #endif Usage of

    Transfer to http://www.cnblogs.com/renyuan/archive/2013/05/22/3092362.html I met this problem in the written test today , Sort it out ! In general , All the lines in the source program ...

  4. 11.6Daily Scrum

    personnel The completion of task assignment Tomorrow's assignment Wang Haonan Realize the function of video browsing on the web page . Research related code and function .817 Database test Shen Kailiang Realize the function of video browsing on the web page . Research related code and function .818 Realize the function of video browsing king ...

  5. python Use @property

    When binding properties , If we just expose the properties , Although it's easy to write , however , There is no way to check the parameters , Results can be changed at will : s = Student() s.score = 9999 This is clearly not logical . In order to limit score Of ...

  6. Node.js:JavaScript Script running environment

    Node.js https://nodejs.org/ 2016-08-03

  7. iOS_38_ gesture

    Pan Pan gestures Finally, the rendering : Swipe Swipe gestures LongPress Long press gesture Pinch and Rotation gesture Kneading ( The zoom ) And rotation Finally, the rendering : Doodle Finally, the rendering : Events are divided into 3 Categories: : touch . Accelerometer . Long distance telecontrol ...

  8. What Android can do modebus CRC16 Calculation , Attach the corresponding C Linguistic CRC16( turn )

    Source : What Android can do modebus CRC16 Calculation , Attach the corresponding C Linguistic CRC16 “ Source ” It's the original address , If you want to know more about zudu, please move to “ Source ”. I'm just looking for articles that I'm interested in . Text : Recently, I wrote Android serial port ...

  9. JDK Common command line tools ( be based on JDK10)

    Even though I was jdk10 In the environment , But in general it's the same as jdk8 It's almost the same . There are so many Originally, I wanted to learn and summarize all the commands at one time , Results found .... Some of them are not very common .... Or I can't touch so much at this level ...

  10. Java Environment deployment Idea : solve Idea in gradle compile war Wrong packet encoding

    IDE Conduct Gradle operation , Then you need to set IDE Parameters of . For example, in IDEA in , Need to open File->Other Settings->Default Settings->Gradle, stay Gr ...