Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. (Qt5) JSON.stringify call Error. Error message is "Converting circular structure to JSON"
Forum Updated to NodeBB v4.3 + New Features

(Qt5) JSON.stringify call Error. Error message is "Converting circular structure to JSON"

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bob Wang
    wrote on last edited by
    #1

    Anybody can help me?
    @main.qml

    import 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"
    }
    

    }@

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved