Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Update texts in qml from python backend for Dummies



  • Good day, I've been searching the internet for a week now trying to update my my qsTr via python backend and have been unable to. I'm not sure if all the tutorials I've been reading are too complex or Im just too dumb, but it's getting frustrating. I'll be glad if anyone will help me break it down maybe explain what components of the code does for a better understanding. All YouTube and internet codes I've been try to adapt to my work doesn't work due to lack of understanding. Thanks in advance.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    @2MJay said in Update texts in qml from python backend for Dummies:

    qsTr

    This implies that you are working on the translation of an application. If that's indeed the case, are you trying to update the QTranslator object from the Python side ?



  • Thanks for the reply @SGaist. What I wanted was to update some data (in form of text) from python backend, most of the tutorials I saw were based on using signals and slots. were as I only needed a slot to read without any triggering signal. Though I've been able to finally figure it out and spending this much time actually made me understood it more. I used QTimer to refresh the backend function every half a second.