Address code formatting
This commit is contained in:
parent
1bf7276d53
commit
cd9b1a6fd3
12 changed files with 80 additions and 90 deletions
|
@ -9,24 +9,26 @@
|
|||
#include <interfaces/shell.h>
|
||||
#include <interfaces/window.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
LayerShellQt::Shell::useLayerShell();
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
QQmlApplicationEngine engine;
|
||||
engine.loadData("import QtQuick.Controls 2.10\n"
|
||||
"import QtQuick 2.10\n"
|
||||
"\n"
|
||||
"ApplicationWindow {"
|
||||
" width: 100; height: 100\n"
|
||||
" visible: true\n"
|
||||
" Rectangle { color: 'red'; anchors.fill: parent }"
|
||||
"}"
|
||||
engine.loadData(
|
||||
"import QtQuick.Controls 2.10\n"
|
||||
"import QtQuick 2.10\n"
|
||||
"\n"
|
||||
"ApplicationWindow {"
|
||||
" width: 100; height: 100\n"
|
||||
" visible: true\n"
|
||||
" Rectangle { color: 'red'; anchors.fill: parent }"
|
||||
"}"
|
||||
|
||||
, QStringLiteral("bananaland:/potato.qml"));
|
||||
,
|
||||
QStringLiteral("bananaland:/potato.qml"));
|
||||
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [] (QObject *object) {
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [](QObject *object) {
|
||||
auto layerWindow = LayerShellQt::Window::get(qobject_cast<QWindow *>(object));
|
||||
Q_ASSERT(layerWindow);
|
||||
layerWindow->setMargins({50, 50, 50, 50});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue