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

Qt Quick for .NET: Access public class members

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • QML: Bridges
    • None

    Description

      Interoperability between C# and Qt relies on generated C++ code that can access all public members of managed classes, including:

      • Fields Variables declared at class scope. A field may be a built-in numeric type or an instance of another class. For example, a calendar class may have a field that contains the current date.
      • Constants Fields whose value is set at compile time and cannot be changed.
      • Methods The actions that a class can perform. Methods can take parameters that provide input data, and can return output data through parameters. Methods can also return a value directly, without using a parameter.
      • Properties Methods on a class that are accessed as if they were fields on that class. A property can provide protection for a class field to keep it from being changed without the knowledge of the object.
      • Events Notifications about occurrences, such as button clicks or the successful completion of a method, to other objects. Events are defined and triggered by using delegates.
      • Operators Overloaded operators are considered type members. When you overload an operator, you define it as a public static method in a type.
      • Indexers Index and object in a manner similar to arrays.
      • Constructors Methods that are called when the object is first created. They are often used to initialize the data of an object.

      When this task is finished I will be able to:

      1. Write C++ code that can access any public member, either instance or static, of a given managed class.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-134961
          # Subject Branch Project Status CR V

          Activity

            People

              mecfc Miguel Costa
              mecfc Miguel Costa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change