How it works...
In this code, you can see that a roomtypes list is defined with four elements: Suite, Super Luxury, Super Deluxe, and Ordinary. To make the elements of the roomtypes list appear as options in the Combo Box widget, the addcontent method is invoked and adds the elements of roomtypes to the Combo Box widget with the addItem() method. Also, the clicked() signal of the Push Button widget is connected to the computeRoomRent() method, which is invoked when the user selects the push button after selecting the date of the reservation, the number of persons staying, and room type. In the computeRoomRent() method, you fetch the date from Calendar Widget, the number of persons from the Spin Box widget, and the room type from the Combo ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access