forked from qt-creator/qt-creator
Live preview: Creating objects dynamically
This commit is contained in:
@@ -213,6 +213,24 @@ void QmlJSDesignDebugClient::changeToZoomTool()
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void QmlJSDesignDebugClient::createQmlObject(const QString &qmlText, const QDeclarativeDebugObjectReference &parentRef,
|
||||
const QStringList &imports, const QString &filename)
|
||||
{
|
||||
if (!m_connection || !m_connection->isConnected())
|
||||
return;
|
||||
|
||||
QByteArray message;
|
||||
QDataStream ds(&message, QIODevice::WriteOnly);
|
||||
|
||||
ds << QByteArray("CREATE_OBJECT")
|
||||
<< qmlText
|
||||
<< parentRef.debugId()
|
||||
<< imports
|
||||
<< filename;
|
||||
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void QmlJSDesignDebugClient::applyChangesToQmlFile()
|
||||
{
|
||||
if (!m_connection || !m_connection->isConnected())
|
||||
|
||||
Reference in New Issue
Block a user