(Qt5) JSON.stringify call Error. Error message is "Converting circular structure to JSON"
-
Anybody can help me?
@main.qmlimport QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
Rectangle {
Button{
id: testButton
text:"Test"
}
Text{
id: testText
text:"TEST"
}Component.onCompleted: { console.log("JSON data = " + JSON.stringify(testText)); //It's OK console.log("JSON data = " + JSON.stringify(testButton)); //Get an error "TypeError: Converting circular structure to JSON" }
}@