About writing GUI programs some of my own understanding

Source: Internet
Author: User
Tags reserved

#PS: Please respect the original, do not like to spray

#PS: Please indicate the source of the reprint, I have All rights reserved

#PS: This is only " my Own" understanding, if and your principles conflict, please forgive, do not spray


System: Ubuntu x64, QT5, QT5 creator




Background: LZ I recently used C & C + + & QT To do a project on Ubuntu, and I didn't say much more. Just to tell me about the development of that GUI.


Introduction: See the Internet, so many people think that a graphical interface program is how difficult, however, to do a console program is how simple. Today, I have come to oppose this understanding which I think is wrong.


First: When we do a project, to complete it, we have to write the appropriate program, and can implement the corresponding functions, so that our project can be considered complete. (This is part of the process that we all recognize)




Now: We want to use the graphical interface to do the same program, is not a lot of people see this goal on the big head


The ...


In fact, I think that as long as you achieve the function you want under the console, then it is very easy to write graphics.



As an example:




#@#@#:

This is a screenshot of a part of the interface.


Here's an example of an input, in C or C + +, scanf and CIN can get the input data at the console, and in this graphical interface, enter the data in the box, the background using the function of this box can accept the data, after receiving the data, the following process and the console program.


This is a function from the console to the GUI transformation, any other function can be, according to the same principle to transfer the transplant




While

Now the graphics library, some provided the GUI design software, most of the interface is drawn through the mouse, a large number of properties can be set directly. At this point, you will find that the graphical interface of the program and your original console program is almost no difference, only the way to show data and action changes in the GUI more friendly.



The interface of the drawing:




This can be directly dragged with the mouse ...



Programming is just for a better tomorrow ... @ (0.0) @















#PS: Please respect the original, do not like to spray

#PS: Please indicate the source of the reprint, I have All rights reserved


Please leave a message, I will reply the first time after seeing

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.