C++ Beginner: Lesson 3 - Simple calculator
After we got familiar with Qt Creator environment in the lesson 2 we will build a simple calculator in order to get familiar with some data types which come with Qt Creator framework like QString and other C++ primitive data types. First of all we need to create a new project as shown in the lesson 1 . During the creation, instead of mainwindow class we have used calculator class. After creating the project, in design view of qt creator we create the layout of our application. Initially we get a LineEdit element from the toolbox panel as shown in the figure 1. Figure 1: Add LineEdit on window After we add the line edit on window we fix the size according to our needs, in this case we fill the window horizontally by leaving some margin right and left. After we add the LineEdit element on window we need to add the buttons for the numbers and operations as well as shown in the figure 2. Figure 2: Add PushButton on window After we add the buttons as shown in the figure above we ...
Comments
Post a Comment