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

Designer plugin without includeFile is missing extends field in .ui file

    XMLWordPrintable

Details

    Description

      This is kind of in between a bug and a feature request.

      The use case:

      A plugin is for a widget that is only supposed to be used as a base class for for other widgets which have their own plugins. That base class should not be allowed to be added to .ui files that are to be processed by uic.

      However, in this case, the widget should still be usable in UIs loaded through QUiLoader. One neat way to achieve this would be to return empty string from includeFile() so that include statement is not generated by uic and thus building would fail if the widget is used while it works perfectly if loaded through loader.

      The issue:

      This works almost. When empty string is returned from QDesignerCustomWidgetInterface::includeFile the include statement is not generated by uic and thus compile error would be generated. But unfortunately the missing includeFile is also dropping extends field from .ui file which causes problems when using any derived class.

      Attachments

        Activity

          People

            kleint Friedemann Kleint
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: