Yujian Yao

Software Engineer

My first Qt program


My 2011 plan is to learn qt, and here comes my first qt program-a simple text editor.

As you can see, one of the best thing about qt is its compatibility across the three major platforms-Linux(X11), windows and Mac(not shown here). Another great feature is its rich UI widget set. Almost all the feature of a text editor are already built-in in the QTextEdit widget. All I have to do is just to design an interface and make use of the various functions. The only function that I actually have to implement is the Find&Replace feature, which serves as a practice to familiarize myself with the QTextCursor library.

And Qt SDK comes with an excellent interface designer. Just arrange the widgets and write a few codes to manipulate it-in fact if the functions are simple, one doesn't even need to write codes, since connecting slots and signals-the qt event handler-can be done visually in the designer. But for this project I wrote out the code as a practice.

The codes are here, and the compiled version for windows is here. The size is quite big (10M) because I statically link the libraries, since otherwise I will need a list of annoying Dll files.