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. Debug javascript in QML possible?

Debug javascript in QML possible?

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 4.9k 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.
  • K Offline
    K Offline
    kathy
    wrote on last edited by
    #1

    I am using QCreator to debug Qt application. Is there a way to debug JavaScript functions using Qt Creator?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      Yes, you should be able to debug QML/JS functions. The documentation for this is located at http://doc.qt.nokia.com/qtcreator-snapshot/creator-debugging-qml.html .

      Regards,
      Michael

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kathy
        wrote on last edited by
        #3

        I have read the link you listed. If I use the code generated from Qcreator Qt Quick Application. The main.cpp file:

        ...
        QmlApplicationViewer viewer;
        viewer.setMainQmlFile(QLatin1String("qml/main.qml"));
        viewer.show();
        ...
        

        I can debug it.

        But if I replace above code with:

        QDeclarativeView view;
        view.setSource(QUrl::fromLocalFile("qml/main.qml"));
        view.show();
        

        Debugger can not be started. Why?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Most likely the QDeclarativeView does not start the debugging support.

          This feature is turned off unless specifically set up since being able to debug a application can be a security issue.

          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