Displaying system clock time in LCD-like digits
Liquid Crystal Display (LCD) digits are a seven-segment display that is commonly used in almost all electronic devices. These LCD digits are much more readable than dot matrix displays. Let's create an application that displays system clock time in LCD-like digits.
How to do it...
In this application, we will be making use of the QTime class to fetch the current system's time. Following are the steps to create such an application:
- Open Qt Designer and create a new application based on the
Dialog without Buttonstemplate. - Save the application with the name
demoLCD.ui. - Since we want to display LCD-like digits, drag and drop the
LCD Numberwidget onto the form, as shown in the following screenshot:

- From the
Property Editorwindow, set theWidthandHeightproperties of theLCD Numberwidget to100and40respectively, just to make the system clock quite visible. Use thepyuic5command utility to convert the.ui(XML) file into Python code. The generated...