Nominate our 2022 Qt Champions!

[Solved] moc adds QDesignerCustomWidgetCollectionInterface

  • Hello,
    I have normal widget with custom widgets in it (using Promote mechanism, NO QDesigner Plugins in application). Custom widgets are not QDesigner plugins and in code there is no reference to QtDesigner or QDesignerCustomWidgetCollectionInterface.

    When application is compiled moc generates ui_*.h for .ui files and in one of those headers I see include like this:

    #include "QtDesigner/QDesignerCustomWidgetCollectionInterface"

    Question: Why QtCreation / moc adds QDesignerCustomWidgetCollectionInterface into ui generated header? This happens for Mingw/Android and probably for MSVC (not tested yet).

    My custom class name is: "RegistrationDialog".

    PS. I tried to "clean" project, basically deleting everything auto generated, any leftover files etc. so only ui/h/cpp files are left. Same issue.

    Solution: My fault, in ui base widget class was not QWidget but subclass of QWidget and QtCreator treated this class as extension.
    <widget class="mywidget" name="RegistrationDialog">
    should be
    <widget class="QWidget" name="RegistrationDialog">

    BTW. it's issue with uic not moc.

Log in to reply