To understand how integer and float values can be accepted through spin boxes and used in further computation, let's create a new application based on the Dialog without Buttons template and follow these steps:
- Let's begin by dragging and dropping three Label, a Spin Box, a Double Spin Box, and four Line Edit widgets.
- The text property of two Label widgets is set to Book Price value and Sugar Price, and the objectName property of the third Label widget is set to labelTotalAmount.
- Set the objectName property of the four Line Edit widgets to lineEditBookPrice, lineEditBookAmount, lineEditSugarPrice, and lineEditSugarAmount, respectively.
- Set the objectName property of the Spin Box widget to spinBoxBookQty and that of the ...