Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17612

[Reg] Dynamic C++ property overrides JS property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 4.6.0
    • Qt Script
    • None

    Description

      #include <QtCore>
      #include <QtScript>
      
      int main(int argc, char **argv)
      {
          QCoreApplication app(argc, argv);
          QScriptEngine eng;
          QScriptValue o = eng.newQObject(&app);
          o.setProperty("x", 42);
          app.setProperty("x", 123);
          qWarning() << o.property("x").toInt32();
          return 0;
      }
      

      With Qt 4.5, the above program prints "42" (value of the JS property); with 4.6, it prints "123" (value of the dynamic C++ property).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kenthans Kent Hansen (Inactive)
              kenthans Kent Hansen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes