Register anchors flags to QML

CCBUG: 507602
This commit is contained in:
Nicolas Fella
2025-08-04 13:08:51 +02:00
parent d436a779d7
commit 5e57a060c6
2 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ public:
AnchorLeft = 4, ///< The left edge of the anchor rectangle AnchorLeft = 4, ///< The left edge of the anchor rectangle
AnchorRight = 8, ///< The right edge of the anchor rectangle AnchorRight = 8, ///< The right edge of the anchor rectangle
}; };
Q_ENUM(Anchor);
Q_DECLARE_FLAGS(Anchors, Anchor) Q_DECLARE_FLAGS(Anchors, Anchor)
Q_FLAG(Anchors)
/** /**
* This enum type is used to specify the layer where a surface can be put in. * This enum type is used to specify the layer where a surface can be put in.

View File

@ -53,7 +53,7 @@ int main(int argc, char **argv)
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
const auto layerMetaEnum = QMetaEnum::fromType<Window::Layer>(); const auto layerMetaEnum = QMetaEnum::fromType<Window::Layer>();
const auto anchorMetaEnum = QMetaEnum::fromType<Window::Anchor>(); const auto anchorMetaEnum = QMetaEnum::fromType<Window::Anchors>();
QCommandLineParser parser; QCommandLineParser parser;
QCommandLineOption marginsOption(QStringLiteral("margins"), QStringLiteral("Window margins"), QStringLiteral("pixels"), QStringLiteral("0")); QCommandLineOption marginsOption(QStringLiteral("margins"), QStringLiteral("Window margins"), QStringLiteral("pixels"), QStringLiteral("0"));