From cd6240536b91ab8dc32c0c6cad7ff254524a9d26 Mon Sep 17 00:00:00 2001 From: eshanized Date: Fri, 20 Dec 2024 18:34:59 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(=5Fexplanation):=20details?= =?UTF-8?q?=20and=20guides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qt/main.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/qt/main.cpp b/qt/main.cpp index 8a75f52..d186e53 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -1,11 +1,20 @@ -#include "snigdhaosblackbox.h" +#include "snigdhaosblackbox.h" // Include the header file for the SnigdhaOSBlackbox class, which defines the core functionality of the application. -#include +#include // Include the QApplication class, which manages application-wide resources and event handling. -int main(int argc, char *argv[]) +int main(int argc, char *argv[]) // Entry point of the application. It accepts command-line arguments. { + // Create a QApplication object to manage the application's GUI event loop and initialize resources. QApplication a(argc, argv); + + // Check if any additional command-line arguments are passed. + // If more than one argument exists, the second argument (index 1) is passed to the SnigdhaOSBlackbox constructor as a string. + // Otherwise, an empty string is passed. SnigdhaOSBlackbox w(nullptr, a.arguments().length() > 1 ? a.arguments()[1] : ""); + + // Show the main window of the SnigdhaOSBlackbox application. w.show(); + + // Enter the event loop, which waits for and processes user interaction events. return a.exec(); }