Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickmacfocusframe.mm
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <AppKit/AppKit.h>
7
8#include <QtGui/qguiapplication.h>
9#include <QtGui/private/qcoregraphics_p.h>
10
11#include <QtQml/qqmlcomponent.h>
12
14
16{
18 context->engine(),
20 "qrc:/qt-project.org/imports/QtQuick/NativeStyle/util/MacFocusFrame.qml")));
22 if (!frame)
23 return nullptr;
24
25 auto indicatorColor = qt_mac_toQColor(NSColor.keyboardFocusIndicatorColor.CGColor);
26 indicatorColor.setAlpha(255);
27 frame->setProperty("systemFrameColor", indicatorColor);
28 return frame;
29}
30
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
The QQmlComponent class encapsulates a QML component definition.
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
virtual QQuickItem * createFocusFrame(QQmlContext *context) override
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
static void * context
QColor qt_mac_toQColor(CGColorRef color)
static qreal component(const QPointF &point, unsigned int i)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
Definition qquickitem.h:492
#define QStringLiteral(str)
QFrame frame
[0]