Hi All,

I'm trying to create dynamic components using Qt.createQmlObject

Qt Code:
  1. Qt.createQmlObject(text, contentRect, "dynamicItem")
To copy to clipboard, switch view to plain text mode 

Here's the single line of text

Qt Code:
  1. 'import QtQuick 2.0;Rectangle{ width: parent.width; contentForReplace}'
To copy to clipboard, switch view to plain text mode 

The contentForReplace is replaced dynamically to create different components at runtime

Is it possible to have // or /* comments */ in the single line?

Kindly advice