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

uic: Support for object creation based on constructors with parameters without default values

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.11.1
    • None
    • All

    Description

      I would like to achieve the complete initialisation for specific objects by the usual constructor execution even if there are parameters involved which have not got a default value.
      I tried to clarify the software situation by the discussion topic "Creating custom widgets based on constructors with parameters without default values" before to some degree.

      An XML schema is published as a description for Qt Designer's UI file format. C++ source files are generated by the user interface compiler based on this data model. It seems that the model is designed in the way so far that objects are handled only when they are default-constructible. Now I am looking again for possibilities around corresponding extensions.

      Some Qt classes accept null pointers as a default construction parameter like "parent". If additional parameters are needed there because special settings can be performed only in the implementation of a constructor for a derived class, they should be passed somehow. I see software design options like the following then.

      The passing method for extra data can become configurable. (It depends on the amount of C++ source code which can be handled there.)

      1. The existing parameter can be replaced by an other class which provides the desired information. The previous argument value can be configured and queried by this adjustment.
      2. Parameter lists (including non-default values) would become supported.

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            elfring Markus Elfring
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes