Results 1 to 5 of 5

Thread: ContextProperty of QQmlPropertyMap object is not writable at qml

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2025
    Posts
    3
    Qt products
    Qt5
    Thanked 1 Time in 1 Post

    Default Re: ContextProperty of QQmlPropertyMap object is not writable at qml

    Quote Originally Posted by d_stranz View Post
    It still looks to me as though you are executing all of this code before the event loop is running. Things that happen in your MainWindowCC and InterfaceObject constructors are taking place before app.exec() (which starts the event loop). Your connect() statements set up signal-slot connections, but any signals emitted are ignored if the event loop is not running.

    Anyway, if that isn't the problem, I can't be of much more help. I don't use qml and do not have any experience with it. What I am saying is from my own experience with C++ and unsuccessfully trying to use signals and slots before an event loop is running.

    Hello Mr.d_stranz
    Many thanks for your support.
    it seems that qml doesn't accept writing to multilevel JSON object like the next anymore:
    Qt Code:
    1. gDatPr["SO0"] [api.shcObjName]="newName"
    To copy to clipboard, switch view to plain text mode 

    but it do accept :
    Qt Code:
    1. var tempVar=gDatPr["SO0"]
    2. tempVar[api.shcObjName] ="newName"
    3. gDatPr["SO0"] =tempVar
    To copy to clipboard, switch view to plain text mode 

    i tworked like this , and the connected signal/slots are working as well

  2. The following user says thank you to AmerQ for this useful post:

    d_stranz (28th January 2025)

Similar Threads

  1. Replies: 1
    Last Post: 13th December 2018, 17:24
  2. TypeError: Object [object Object] has no method 'sendData'
    By TheIndependentAquarius in forum Qt Quick
    Replies: 2
    Last Post: 30th November 2013, 05:54
  3. QQmlPropertyMap, model
    By sBoff in forum Qt Quick
    Replies: 7
    Last Post: 27th August 2013, 10:33
  4. Replies: 3
    Last Post: 11th July 2012, 12:40
  5. Replies: 1
    Last Post: 8th November 2011, 22:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.