The first step on the GUI programming road (a bit of meaning, detailed introduction of the Novice's learning Path)

Source: Internet
Author: User
Tags qt designer

The first step on the GUI programming path

--My Qt learning method and the continuous transformation of QT cognition

Start contact with the GUI and start contacting QT:

        The first time I saw the term "Qt" as if it were on the homepage of the CSDN website, because Csdn seemed to be advertising for QT and a column of ads on the home page, just when , I have not yet deliberately paid attention to this strange word. In the middle of my sophomore semester, that is about 2011 December, because I have just finished the assembly language of the introductory study, is about to formulate the next learning goal, so, and began to find the information, at the same time, also began to worry about their employment problems, and began to collect some recruitment units of information, this time, In some units of the campus recruitment information to see in the "C + + research and development engineers" such posts, has several priority requirements, will script programming priority, familiar with reading English document priority, will be graphics programming priority, at this time more deepened this is not very satisfied with the C + + Win32 Console Application of my desire to learn graphic programming, think before the tangled, want to get a Russian box, want to get a tank war, these are pumped into the graphics programming, have not contact with MFC, to learn from the basic MFC more time is needed, and finally gave up the idea of doing those small programs. In addition, in the collection of information found in some units specifically mentioned this graphic programming is QT, so, I began to be a little curious about it, began to collect information, understand QT, and Qt with MFC, GTK +, wxwidgets These development tools to compare, but, The comparison of development tools is the most boring activity, like a variety of compiler language C++, java, C # These comparisons are as boring, because each has its own characteristics, who can not say what problem, every tool or language exists, there must be its cause, this reason, One embodiment is that the tool or language is not extinct, but, even if I know this, I still go to compare, because, or want to choose one of their own most interested and do not violate their learning purpose of the tool to learn, later, I also forgot what the impact of the article, find a lot of articles, the specific content also almost forget , probably are talking about some cross-platform features, as well as the picture is not good, there is a package of how the problem, but later or hastily decided to learn QT, because, many days of data collection, so that they are disgusted with, and spend so much time in collecting these unimportant things, it is not as quick to learn, so , uh ~ Almost can use cornered this idiom to describe this situation, because oneself sometimes force to be relatively tight, no plan to set down, will only let oneself more anxious, sometimes hesitate is not as decisive. In this way, I began to relate to "Qt". Also during that time, the words found on the Internet "QT is a cross-platform C + + graphical user interface application framework" throughInformation sent to their mobile phone, from time to time to see, try to back it down, lest others ask this "Qt" is what, oneself even the most basic description will not be so embarrassed.

0. It's a bit messy, just a little recap on how to start contacting the GUI and start contacting Qt is:

1. has seen QT in the CSDN net but directly ignores its existence;

2. The plan to consult the information found that he is a little want to learn interface programming;

3. Accidentally discovering the presence of QT;

4.-> to compare QT with other development tools;

5.-> hastily decided to learn QT;

6.-> started the QT learning path.

Getting to know QT:

    want to learn a thing, but the most miserable situation is no one to guide it, and their side without a person to learn these things, so, still have to rely on their own AH ~ because individuals like to self-study books, so, the internet found two books, respectively, "0 basic science QT4 Programming" (Wu di) and "C + + GUI programming with Qt 4" (Second edition Chinese version) (Jasmin Blanchette and Mark Summerfield), this time, is precisely my sophomore semester final exam tense preparation time, so, Bought these two books after not how to turn over these two books, has been endured not so fast to see these two books, until the exam things ready to give yourself to learn qt, so, December to 1  early, entered the university exam preparation State, what to learn things are first put down, before the exam, Time is a little loose, the review is almost finished, so, against the plan, secretly learn, this time, did not start to see the QT two books, but accept the network information before the proposal, try to understand what is the GUI and some of the GUI programming needs of the small foundation, so, First about the first two episodes of "Xinxin Sun VC + + video Tutorial", finally know what is the API, what is the handle, what is the message, the original look strange and esoteric things are not so difficult to understand, but a very easy to understand the concept of it, especially those with English, if the English translation over, found that the original is literally, and then, from the two episode of the video, but also know, the original, MFC inside, a lot of just call call call Ah, in addition to call or call, from a huge API library inside call, this also may be I did not delve into the experience of MFC, say, MFC full name is: Microsoft Basic Class Library, Microsoft Foundation Classes. It's not so hard to remember. Although know that a bit of GUI knowledge, but, for Qt, is still unfamiliar, so, I am silly, in the beginning of the book before the study, I have started to find the software to write Qt, fortunately, also did not waste a lot of time, go a lot of detours, found the QT creater SDK, But the download installed on the interface is not very familiar, but also did not go to it, and so after the exam, after reading the C language, began to learn, the first choice is to open the "0 basic QT4 Programming" Wu di this book, because this book is really a lot of foundation, even the background of those are said, Really suitable for a complete rookie, so, spent a few days, slowly put the background of those also seriously read, because this is also very interested, it seems very interesting story, and then, from the first chapter of the book to the fifth chapter, the introduction is the basis, although it seems to be relatively small basis, but alsoIt is very rewarding, because, it introduces in detail the QT several versions, the commercial edition, the GPL,QT SDK contains the program such as Qt Library, Qt Designer, Qt Assistant, Qt Demo, qmake and so on role, It is from these learning and continue to find information, the original SDK translation is the Software development toolkit this meaning, there are some previously thought very esoteric nouns, ide,handle, those meaning ~ simply, is the initial understanding of the background and development of QT learning and the need for tools. At the same time also through the process of learning this, feel that they have expanded their horizons, has always felt that their knowledge is very narrow.

0. Generalization, generalization, seems to have become a fixed format the process of getting to know Qt is:

1. Because of no guidance, determined to find information online to buy two books for learning;

2. Not started to read the book, first began to look at two episodes of "Xinxin Sun VC + + video Tutorial" To understand the GUI foundation;

3. Start to open the "0 basic QT4 Programming" study one to five chapters know the background of QT, IDE and Qt_gui Programming Foundation.

Start learning QT:

After the completion of the basic learning, and finally can look forward to a long time on the machine, computer programming, my first program or the most common Hello Qt, hey, HEI, the first program according to the book Knock, knock it out, infinite excitement, in addition, and because then found that the content of the two books seems to begin overlapping parts, so, Will learn to change, see two books have Hello Qt, but two examples are not exactly the same, so, the two book of the same chapter study, in order to achieve complementarity, strengthen the role, then the chapter study, also did a very detailed study notes (in the blog has Records), then the study method is mainly, analysis code, From the analysis of learning grammar, from the analysis of the QT program design ideas. Then, when writing the study notes, show the program function, from the function analysis program, summarize the program design ideas, extract (revised) code. In this way, learning the "approaching Qt" chapter, from this part of the study, began to familiarize with the QT design, grammar, basic concepts. In addition, the same way to learn the "dialog box" content, but, at this time, two books have used to QT assistant content, like the pure programming of me, unavoidably also a little shaken, on the group asked people, everyone said, with this, convenient, the actual work is generally used, so, also have to take this also slightly learn , but it's not that hard to learn, it's easier than writing code, and you see the properties and components of some components in this tool. In this way, completed two part of the study, at this time, is already near the new year, coupled with the big homework did not complete, and see the content of the next section more difficult, so, want to turn the type, the first to complete the data structure of the large work to continue the study of QT, sure enough, and changed the plan, the data structure of

0. To summarize, start learning qt:

1. Combined with "0 basic QT4 Programming" and "C + + GUI programming with Qt 4" two books.

2. For the previous two parts of the study (Approaching Qt, dialog box), analysis of code, from the analysis of learning grammar-level mastery of QT program design ideas.

3. Know that QT has the use of pure programming, but also the use of the mouse with QT designer design, coarse and coarse to learn the QT designer.

Try the conversion method to learn QT:

        My winter vacation homework, but also as my own project experience of the C + + programming applet (Family Tree Management System), once again started Qt learning, but found it seems in two books in the next chapter " The main window "There is no complete code, it is difficult, usually through the analysis of the code backward thinking of this learning method, and then see the" 0 basic QT4 Programming "The book's later chapters seem to be arranged not yesterday, can be said to be basically no content, so, Quickly put the book behind the theory with little to do with the theoretical knowledge to look carefully, after reading the "layout management", "QT core mechanism and principles" These chapters, put down the book, this book becomes the equivalent to take me in the door after the retirement of the book. Now there is a book, it is tangled, it seems more painful to see, do not know whether the knowledge deepened or what reason, in addition, if continue to like the previous two chapters of the learning method, but also as if the progress is too slow, and QT learning is not as I learned C + + at that time with "C + + Primer Plus" That the completion of the book to master most of the knowledge, not, because the understanding of QT has a large library, but also just in my first two chapters of study, the third chapter of the study of assistant found, originally, the contents of the two books can be from QT demo and QT Assistant inside found Ah, just that is the English version of it ~ Well, began to find a way out, it seems that the learning method is really going to change, so, want to put QT assistant content are to try to translate so study, think of to find a few QT Demo in the example of the production to drive their own learning, but later, or give up the idea, because it feels like this is not the system, this is the book there is a special directory of reasons, so, again began to search for information, want to find out if someone has written their own way how to learn the experience of Qt and other articles for reference, Can't find, but pour a careless, put a good study material to find out the "Bean Space Qt Learning Road" This is a blog composition of the book, it seems easy to understand, it seems to fit the individual learning style, slightly browse the electronic version of, um, decided to use, so, whining, the most expensive one print, Sanmao a piece, Hit 243 pages of A4 paper, plus a 12 yuan cover, no more than this study materials spend more money, 85 yuan Ah ~ recently spent on the study of money is the most. Haha, but also is value for money, spent four days, it is sometimes on the machine sometimes browse, but, this book is not finished, before, just get this book, a closer look at the part, the dialog box of those also on the machine, found that its content is not forget, but also easy to understand, and on the machine fun, after, See the event thing, because there is no instance, see a little dizzy, but also probablyUnderstand the QT event mechanism, then, the graph chapter, look at this chapter, I found, as if, I am interested in this thing is not very big, and this look closely, as if also quickly forgotten, so, quickly read the back of the content, found that you can change the learning method, the first of these content each section about to see, Know this QT Total is composed of what, that, to understand the whole QT part of the architecture, so, towards this goal, on the fourth day, also finally the whole book browsed once, deep experience, found that some things with the previous things have relevance, some things can be independent, some things can be used at this stage, Some things in special circumstances can be used, and then look at the "C + + GUI QT4 Programming" book Directory, also seems to understand why it is so organized, this knowledge network is probably the case. Forgot to say, in the last time to find the information "beans", I printed a QT class inheritance table down, because it is too many classes, printing down the use of time to see can make their ideas clearer. In addition, through the "bean space" qt Learning I know, I have some content is necessary to master a bit better, some can be used to re-check, but you can do a small module to play a bit familiar. A variety of "dialog" is the basis of the foundation, some M-V project view is also used, so this must learn, in addition, "M-v Project View" is also very important things, second school, after, about some containers, files these, and C + + difference is not small, can be summed up by text to consolidate, "graphics", "Internationalization", " Drag and drop "these associations are not big, you can take a small example to play with each." I think the next Qt learning method, has been set, the first to complete the task, on the machine, summarize notes, and then back to read the "C + + GUI QT4 Programming" this book.

0. To summarize, start learning qt:

1. Found that according to the previous analysis code method has problems, the book does not have the complete code, the learning method has to transform, the first to abandon Chapter code analysis study.

2. Begin to quickly learn from the theoretical knowledge that 0 basic QT4 programming is not related to direct programming (layout management, QT core mechanism and principle).

3. Find information, find the "Bean Space Qt Learning Road", found that the content is easier to understand.

4. Take a closer look at the QT learning path of the Bean Space dialog box, the content of the event, and later decided to quickly browse through the entire book, Understanding the architecture.

5. Know that in fact a lot of content, it is difficult to grasp all of a sudden, began to pay attention to the idea of learning.

6. Despite this belief, however, the decision to first grasp the most important and basic things first, in addition, to focus on practice, the use of Qt Assistant.

Learning QT into the stable phase:

With this want to learn, began to re-analyze the current QT learning situation: There are three books on hand, "0 basic qt" brought me to the door after I called it retired. The rest of the book I'm most worthy of seeing is the use of QT designer (Qt Desinger is the software of the Mouse interface method). Because at this stage of learning like purely hand-programmed programming interface, and pure manual on the basis of the master is also more reliable, the original look at QT also has a reason is this. Learning methods in the process, found that the "C + + GUI QT4 Programming" as a post-consolidation books (in fact, all the content is from the QT assistant that MFC inside the library of the same thing) "Qt Learning path" (beans space), has all its browsing, Know the general framework, that is, QT inside something can be used, commonly used to know where to find.

After the analysis on the re-enactment of the Plan, 1. (one or two days) complete the programming exercise of the graphics block. 2. M-V Architecture Project View, estimated three days or five days, this is a very important thing, understand this is equivalent to or can be understood as a table like Excel, such as the function of the data of the operation of the production. 3. In fact, what is missing now is a point that links the knowledge learned to Qt. That is, QT now only know how to make the interface, how to the QT interface and as I wrote the family tree in the data changes as the input and output? As long as the problem is solved, I believe I can have great confidence in the basis of QT. Also due to the above, with the following two points. 4. Do a job like office, "performance management system" and other software as a practical project-driven learning. 5. Do a game class, "Snake" "Russia" and other classic games. 6. I would like to finish these two qt, the QT programming method mastered the same. 7. Finally, the reinforcement phase, of course, taking into account the issue of time, this step has been able to ignore not to go, may wait for the real job, after the stability, then this step is finished, this step is the "C + + GUI QT4 Programming" to see, fine practice once, this is absolutely powerful foundation of the treasure, but also time-consuming (In other words, if you have just started to use this book to learn, it will be very difficult, very time-consuming Ah, not the complete beginner's directory knowledge of the arrangement is very good)

When I learned the Qt grammar based on the knowledge of the project view, I suddenly felt, originally, the use of QT, not how much you have the foundation, it needs to be your temporary problem-solving ability, no matter how good your foundation, you can not put all of these kinds of things in the library, that is, the use of cooked, QT Class Library will continue to update, only when thinking about the problem, know where to find the answer to the problem, this is the learning of QT, I have just reviewed the notes before, so far, their own study notes did seven parts of the content:

Part 01 approaching QT (2012.01.15)

Part 02 dialog box (Qt) [2012.01.20]

Part 03 main window (Qt) [2012.02.10]

Part 04 various dialog boxes (Qt) [2012.02.11]

Part 05 Simple artboard Implementation (QT) [2012.02.13]

Part 06 Project View (Widget) (Qt) [2012.02.16]

Part 07 Project View (Basic M-v Architecture Class) (QT) [2012.02.17]

Part 08 Custom Delegate (Qt) [2012.02.18]

In each chapter of learning, let me learn these:

Part 01 Let me know the method of Qt's most basic window display.

The Part 02 dialog box (Qt) lets me know the basic method of layout, signal/slot connection.

Part 03 main window (Qt) Let me know the main window, understand what is the main window, how to add the most basic components of the function, know what the action is, how to let the action to trigger the signal with the slot, understand the toolbar and the menu bar of the basic button to add.

Part 04 various types of dialogs (QT) Let me know what the basic categories are in QT or in the dialog box that is in window.

Part 05 Simple artboard implementation (QT) Let me know about the application of the event, use, know what a complete small program is implemented, know about the application of the Qpainter class.

Part 06 Project View (Widget) (Qt) Let me know what kind of a view can be divided, in fact, there are only three kinds of list,tree,table. Know the approximate way to add the data to be deleted.

Part 07 Project View (Basic M-v Architecture Class) (Qt) Let me know how the M-V architecture is probably implemented, and how each of these three architectures might respond to each function.

Part 08 Custom Delegate (Qt) understands the meaning of custom delegates and realizes how to write delegate classes.

Learning the custom model class, the Epiphany, suddenly feel that the class is actually created to be related to the inherited class, the associated class, association, and then, to use which class, then to seriously read the QT Assistant, to know the most important function of this class can be realized, and then, To understand its usage, to understand what its signal will be, what its slots are, what its common functions are, and of course, its parent class, which also mentions what functions it can use in the parent class.

After that, I started to do project-driven learning, not to solidify what kind of knowledge, which foundation, but to familiarize yourself with the ability to learn and to use, but to let you improve the application of this software's class library. There are many events, there are many signals/slots, the type of window is more, all of a sudden want to be familiar with is impossible, only through constant review, and constantly solve the problem, so that is the true purpose of learning.

0. To summarize, learn QT into a stable phase:

1. Analysis of what is required to focus on learning, the development of learning content outline, for each part of the study.

2. Most of the learning methods are direct look at the "Bean Space qt Learning path", analysis code, try to write off the book again, do the next study notes.

Start to try direct production of small projects to drive QT learning:

February 18, 2012, began to try to find a project-driven learning, who knows, and then found a problem, you do which project, you decide which direction, so, if you do not want to master QT, there is no need to go to what type of project have done, just use the time to do good, today see about the "Cannon" Of the small game, in fact, only used three classes, and then, if it is to do other games, the three classes may not be used, it may also be a bit of the idea of game programming, but later thought, I still do not need, this thought, may be similar to Office software, so , I again in the QT demo inside found an instance, found or do a document editor update affordable, I want to do this, you can know how each function is more clearly linked together, and then, also intends to change this document editor, which is a window, I want to change to a multi-window, A main window contains several open files, want to implement this function, and then found a similar feature of the example, I hope these two instances can help. Then, and think, want to do a "family tree management System" and "Student management system" and the like, but now do not want to do, want to first put this "document editor" to do, and then to do those, student management system, looked at the topic, in fact, using the knowledge of QT is not a lot, so, or directly first done Document Editor "If there is time, then the student management system" to make it.

So, later, I chose to do a "multi-window document editor", spent a period of 20 days or so, on March 08, 2012, finally the small project completed (in my blog has footprints), completed, but also full of excitement. In the use of small projects to drive the learning process, I have more experience of this is the importance of learning to use, because, many times, you do this thing, you have to master this thing, QT class library so large, difficult to take it under the palm of it, if you want to master more, then find a few different types of small projects to drive learning, In this small project, encountered problems, because QT is still relatively new ah, no such as MFC those online a dozen will be a lot of information, so, encountered problems, on several forums to ask questions, is tangled, basically are 0 or a answer, so, at this time more know, they can rely on, Only assistant and Practice test, so, constantly try, constantly analyze, solve problems, the small program to do it out.

0. To summarize, start to try direct production of small projects to drive QT learning:

1. Project-driven learning, choose your own interests as a topic, imitate a number of examples, learn to use QT Assistant data access.

2. Keep looking for different types of items, or the type of aspects you want to practice.

The little end point of QT Learning:

In the completion of their own layout of the small project, I think, this is a QT learning, but also a small end of GUI programming, but, I believe this GUI learning is not over, because, perhaps, in the future still need a lot of places to use it, and such learning methods, such learning comprehension, I won't forget it. In fact, in the QT Small project, I would like to quickly end it, this is because, it is just beginning to do this small project, and then, just start school two weeks, our school in the Electrician internship class, the day time is all no, only the night of a little time, in addition, I am still in the learning stage, want to quickly end this study, and then into the next part of the study, yes, I know, is a little impetuous idea, so, also often remind oneself to calm, steady is my style of work. OK, hard, next, continue to drift in the ocean of computers, continue to learn more, more, broaden their horizons, and strive to learn from their own bit of application to life, applied to the computer's professional field, applied to the various fields across the computer! Come on! Good good Study, day.

I side dishes, although the article is not yesterday, but still afraid of someone like to reprint, but still want to retain the personal what what right, so, if want to reprint comrades, to you have a small request, please write: article from: http://blog.csdn.net/neicole

http://blog.csdn.net/neicole/article/details/7333524

The first step on the GUI programming road (a bit of meaning, detailed introduction of the Novice's learning Path)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.