C++17 By Example: Practical projects to get you up and running with C++17 by Stefan Björnander

C++17 By Example: Practical projects to get you up and running with C++17 by Stefan Björnander

Author:Stefan Björnander [Björnander, Stefan]
Language: eng
Format: epub
Tags: COM051010 - COMPUTERS / Programming Languages / General, COM051070 - COMPUTERS / Programming Languages / C++, COM051060 - COMPUTERS / Programming Languages / C
Publisher: Packt Publishing
Published: 2018-02-26T00:00:00+00:00


The main function

Finally, we start the application in the main function by creating an application object, showing the main window and executing the application.

Main.cpp:

#include "DrawingWindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication application(argc, argv); DrawingWindow drawingWindow; drawingWindow.show(); return application.exec(); }

The following output is received:

Building an editor

The next application is an editor, where the user can input and edit text. The current input position is indicated by a caret. It is possible to move the caret with the arrow keys and by clicking with the mouse.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.