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. Qt.resolvedUrl from included .js file (problems in 5.2)
Forum Updated to NodeBB v4.3 + New Features

Qt.resolvedUrl from included .js file (problems in 5.2)

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.3k 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.
  • G Offline
    G Offline
    gabzuka
    wrote on last edited by
    #1

    Hi,

    We just updated to 5.2 and now have some strange issues.

    I have a JS function inside a file (FileA.js) that uses Qt.resolvedUrl to then pass to Qt.createComponent to create a dynamic QML object. This JS file is being included in another JS file (FileB.js) using Qt.include. Because of this (I think) the Qt.resolvedUrl is resolving the url relative to FileB.js instead of FileA.js.

    Is there a way of preventing that so I can resolve my relative file references properly?. Am I going the wrong way about this?. It used to work properly in 5.1.1.

    Thanks a lot!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerMas
      wrote on last edited by
      #2

      Maybe it has something to do with the problem I described here:
      http://qt-project.org/forums/viewthread/36213/

      For me the QT.include doesnt even work in 5.2. Maybe that is also your problem, which causes the behavior you described.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gabzuka
        wrote on last edited by
        #3

        Hey DerMas,

        Yes, sounds similar. Something is wrong with paths when including JS files. Did you find a workaround?.

        Does anyone have any ideas what's going on?.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerMas
          wrote on last edited by
          #4

          Thanks for your reply, proving this is really a problem. Unfortunately, my workaround was to downgrade to 5.1...

          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