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. How to view/print qml stack trace?
Forum Updated to NodeBB v4.3 + New Features

How to view/print qml stack trace?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 2.5k Views 2 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.
  • P Offline
    P Offline
    patrickkidd
    wrote on last edited by
    #1

    I have an application that is about a 50/50 mix of C++ (Python, actually) and Qml. It is difficult to debug communication between C++ and Qml. While you can put a breakpoint in C++ for a method called by Qml (like model.data()), you don't know what the QML stack that called it looks like.

    Is there some way to view or print the current calling Qml stack trace? FWIW, I am using Visual Code and PyQt and am good with C++.

    https://alaskafamilysystems.com/

    raven-worxR 1 Reply Last reply
    0
    • P patrickkidd

      I have an application that is about a 50/50 mix of C++ (Python, actually) and Qml. It is difficult to debug communication between C++ and Qml. While you can put a breakpoint in C++ for a method called by Qml (like model.data()), you don't know what the QML stack that called it looks like.

      Is there some way to view or print the current calling Qml stack trace? FWIW, I am using Visual Code and PyQt and am good with C++.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @patrickkidd
      does this help?
      https://forum.qt.io/topic/122818/get-file-name-line-number-and-function-name-in-qml-javascript-how/4

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      P 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @patrickkidd
        does this help?
        https://forum.qt.io/topic/122818/get-file-name-line-number-and-function-name-in-qml-javascript-how/4

        P Offline
        P Offline
        patrickkidd
        wrote on last edited by
        #3

        @raven-worx Yes it does.

        For the record: print((new Error).stack)

        https://alaskafamilysystems.com/

        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