Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Can I write short article "How to use underscore.js in Qt Quick"?
Forum Updated to NodeBB v4.3 + New Features

Can I write short article "How to use underscore.js in Qt Quick"?

Scheduled Pinned Locked Moved Wiki Discussion
5 Posts 2 Posters 4.7k 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.
  • R Offline
    R Offline
    rominf
    wrote on last edited by
    #1

    Hi!
    I need to use underscore.js in my project, but it doesn't work with simple:
    @import "underscore.js" as Underscore@
    because of "immutable root object":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-javascript-hostenvironment.html#javascript-environment-restrictions

    I found tricky way to make it work, but it gives:
    @QML ApplicationWindow: Binding loop detected for property "_"@
    and requires changes (5-10 lines) in underscore.js.

    Can I write article or I shouldn't since my approach is dirty?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Wiki is open to everybody, go ahead if you feel like it.

      (Z(:^

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rominf
        wrote on last edited by
        #3

        [quote author="sierdzio" date="1370152329"]Wiki is open to everybody, go ahead if you feel like it.[/quote]

        OK, I will try.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rominf
          wrote on last edited by
          #4

          I posted my solution:
          http://qt-project.org/wiki/Qt_Quick_Underscore.js

          1 Reply Last reply
          1
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Cool, thanks :-)

            (Z(:^

            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