DesignerDemo Example

#include <QApplication>
#include <QScreen>
#include "mainwindow.h"

/* MainWindow */
MainWindow::MainWindow(QWidget* parent)
    : RibbonMainWindow(parent)
{
    ui.setupUi(this);
    ribbonBar()->setFrameThemeEnabled(true);

#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
    const QRect availableGeometry = screen()->availableGeometry();
    resize(2 * availableGeometry.width() / 3, 2 * availableGeometry.height() / 3);
    move((availableGeometry.width() - width()) / 2, (availableGeometry.height() - height()) / 2);
#else
    resize(800, 640); move(200, 200);
#endif
}

MainWindow::~MainWindow()
{
}