This project is an implementation of an interactive analog clock using the QML language within the Qt framework. The application provides a simple and elegant UI to display time and allows the user to manually set the time by dragging the clock's hands.
- Live Clock: Continuously updates the second, minute, and hour hands to display the current time.
- Draggable Handles: Users can adjust the time by clicking and dragging the minute and hour hands.
- Reset Functionality: A reset button to set the clock back to the current time.
- No Images: Fully drawn using QML elements like Rectangle, Canvas, and Text without the use of any Image elements.
- No QtQuick.Controls: Implemented with basic QML elements, avoiding the use of QtQuick.Controls for educational purposes and greater control over behavior.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Qt 5.x with Qt Quick 2.15 (or later)
- Qt Creator IDE (recommended for ease of use)
Follow these steps to run the project on your machine:
- Clone the repository using git:
git clone [project-url]
-
Open Qt Creator and navigate to
File > Open File or Project
. -
Locate the directory where you cloned the repository and open the
CMakeLists.txt
file. -
Configure the project with the appropriate kit (for your system/compiler) when prompted by Qt Creator.
-
Build the project by clicking the "Build" button (hammer icon) in Qt Creator.
-
Once the build is complete, you can run the application by clicking the "Run" button (green play icon).
- To set the time manually:
- Click and drag the minute or hour hand to the desired time.
- The second hand can also be dragged if precise setting to the exact second is needed.
- To reset the time to the current system time:
- Click the "Reset Time" button located at the bottom of the clock interface.