{"id":129,"date":"2026-02-13T16:27:02","date_gmt":"2026-02-13T16:27:02","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_eanes\/?p=129"},"modified":"2026-03-28T19:26:37","modified_gmt":"2026-03-28T19:26:37","slug":"free-friday-2-13-26","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_eanes\/2026\/02\/13\/free-friday-2-13-26\/","title":{"rendered":"[EDIT]Free Friday: 2\/13\/26"},"content":{"rendered":"\n<p>Today I built a stopwatch application using PyQt5 with a video tutorial. It has a simple interface with a time display and three buttons: Start, Stop, and Reset. The stopwatch updates in real time and keeps track of hours, minutes, seconds, and milliseconds.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Stopwatch(QWidget):<\/code><\/pre>\n\n\n\n<p>^This class defines the entire stopwatch application. It sets up the time , UI elements like the label and buttons, and the timer that updates the display.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def initUI(self):<\/code><\/pre>\n\n\n\n<p>^This function builds the interface. It creates the layout, adds the time display and buttons, centers the text, applies styling, and connects each button to its function.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def start(self):<\/code><\/pre>\n\n\n\n<p>^This starts the timer. It runs every 10 milliseconds so the stopwatch updates smoothly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def reset(self):<\/code><\/pre>\n\n\n\n<p>^This stops the timer, resets the time back to zero, and updates the display to show 00:00:00.00.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"750\" src=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/02\/Screenshot-2026-03-28-151545-1024x750.png\" alt=\"\" class=\"wp-image-163\" srcset=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/02\/Screenshot-2026-03-28-151545-1024x750.png 1024w, https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/02\/Screenshot-2026-03-28-151545-300x220.png 300w, https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/02\/Screenshot-2026-03-28-151545-768x563.png 768w, https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/02\/Screenshot-2026-03-28-151545.png 1439w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Today I built a stopwatch application using PyQt5 with a video tutorial. It has a simple interface with a time display and three buttons: Start, Stop, and Reset. The stopwatch updates in real time and keeps track of hours, minutes, seconds, and milliseconds. ^This class defines the entire stopwatch application. It sets up the time&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":3,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/129\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}