convert qml project to qtwidgets

This commit is contained in:
talksik
2026-01-10 11:40:40 -08:00
parent 947617ef37
commit d30d11322a
5 changed files with 89 additions and 44 deletions
+27
View File
@@ -0,0 +1,27 @@
//
// Created by arjun-flowylabs on 1/10/2026.
//
#include "MainWindow.h"
#include <QPushButton>
#include <QVBoxLayout>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
QWidget *centralWidget = new QWidget(this);
QVBoxLayout *layout = new QVBoxLayout(centralWidget);
QPushButton *button = new QPushButton("Clickable Button", centralWidget);
layout->addWidget(button);
layout->setAlignment(button, Qt::AlignCenter);
setCentralWidget(centralWidget);
}
void MainWindow::resizeEvent(QResizeEvent *event)
{
QMainWindow::resizeEvent(event); // Let layout finish first
}
MainWindow::~MainWindow()
{
}