ADTF  3.18.2
cScriptQtSharedClient

Interface client for adtf::ui::giant::IQtShared. More...

Inheritance diagram for cScriptQtSharedClient:
[legend]

Public Member Functions

Q_INVOKABLE QObject * getObject (const QString &strName="")
 Get a handle to an existing or new Qt object (i.e. More...
 

Properties

bool connected
 

Detailed Description

Interface client for adtf::ui::giant::IQtShared.

Example Usage

Using Qt Objects

import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.0
Item
{
Component.onCompleted:
{
var qtshared = filter.createInterfaceClient("qtshared", "qtshared")
filter.connected.connect(function()
{
if (qtshared.connected)
{
testSharedComponent.createObject(qtshared.getObject())
}
})
}
Component
{
id: testSharedComponent
Rectangle
{
color: "red"
width: 50
height: 50
}
}
}

Providing Qt Objects

import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.0
Item
{
// all you have to do is define this method
function getObject(name)
{
return layout
}
ColumnLayout {
id: layout
}
}
Q_INVOKABLE QObject * getObject(const QString &strName="")
Get a handle to an existing or new Qt object (i.e.

Definition at line 215 of file interface_clients.h.

Member Function Documentation

◆ getObject()

Q_INVOKABLE QObject* getObject ( const QString &  strName = "")
inline

Get a handle to an existing or new Qt object (i.e.

a layout).

Parameters
[in]strNameThe name of the object that is requested
[out]pObjectThis pointer will be updated to point to the requested object.
Returns
Standard result.

Definition at line 232 of file interface_clients.h.

References THROW_IF_FAILED.