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.
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 Buttons
template. - Save the application with the name
demoLCD.ui
. - Since we want to display LCD-like digits, drag and drop the
LCD Number
widget onto the form, as shown in the following screenshot:
- From the
Property Editor
window, set theWidth
andHeight
properties of theLCD Number
widget to100
and40
respectively, just to make the system clock quite visible. Use thepyuic5
command utility to convert the.ui
(XML) file into Python code. The generated...