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. .pragma library
Qt 6.11 is out! See what's new in the release blog

.pragma library

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 3.0k Views
  • 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.
  • S Offline
    S Offline
    supaiku_
    wrote on last edited by supaiku_
    #1

    I had been under the impression that .pragma library meant "loads only once". That's correct for QML files importing JS files,
    but not for JS files importing other JS files.

    The JS file loaded by the QML file, doesn't share the context with the same file loaded from a JS script.
    I hope this is a bug?

    Edit:
    Nevermind... I just learned that the docs are leaving out important information.
    I found the culprit that's the cause of my problem(s):

    This copies all functions from the other file into the current file's namespace, but ignores all pragmas and imports defined in that file.

    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