Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Why QScriptValue and not QVariant?
Forum Updated to NodeBB v4.3 + New Features

Why QScriptValue and not QVariant?

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 1.2k 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.
  • S Offline
    S Offline
    SimonHaines
    wrote on last edited by
    #1

    I've been browsing through the QScript code and wondered why script values are contained to their own type (QScriptValue) which has pretty much the same underlying machinery as QVariant, whereas it would be trivial to write QVariant-aware wrapper types for the ECMAScript types (Date, RegEx, etc) and use these.

    Are there implementation concerns I'm not aware of that precludes using variants? Is it faster to avoid the QVariant infrastructure? Am I missing something?

    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