mirror of
https://github.com/Xevion/orianne.git
synced 2025-12-06 01:15:34 -06:00
Reformat main.cpp
This commit is contained in:
24
main.cpp
24
main.cpp
@@ -1,34 +1,26 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
//! [0]
|
||||
#include <QtUiTools>
|
||||
//! [0]
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtWidgets/QSpinBox>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QFile>
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
//! [1]
|
||||
static QWidget *loadCalculatorForm(QWidget *parent = nullptr)
|
||||
{
|
||||
QUiLoader loader;
|
||||
|
||||
QFile file(u":/forms/calculatorform.ui"_s);
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
return nullptr;
|
||||
|
||||
QUiLoader loader;
|
||||
QWidget *formWidget = loader.load(&file, parent);
|
||||
|
||||
file.close();
|
||||
if (formWidget == nullptr)
|
||||
return nullptr;
|
||||
//! [1]
|
||||
|
||||
//! [2]
|
||||
auto *inputSpinBox1 = formWidget->findChild<QSpinBox *>(u"inputSpinBox1"_s);
|
||||
|
||||
Reference in New Issue
Block a user