[Interest] weird QDesignerCustomWidgetInterface behavior

Frank Hemer frank at hemer.org
Fri Oct 21 12:51:50 CEST 2022


Hi all,

I'm developing a designer widget plugin (VMCScrollArea) that inherits from 
another class (VMScrollArea) whos base class is a QScrollArea.
Now when the plugin is added to a dialog in designer, it creates these entries 
in the custom widget area:

  <customwidget>
   <class>VMScrollArea</class>
   <container>1</container>
  </customwidget>
  <customwidget>
   <class>VMCScrollArea</class>
   <header>VMCScrollArea.h</header>
   <extends>VMScrollArea</extends>
   <container>1</container>
  </customwidget>

and as a result, the layouting and the size properties have weird behavior.

If i manually change these lines to:

  <customwidget>
   <class>VMCScrollArea</class>
   <header>VMCScrollArea.h</header>
   <extends>QScrollArea</extends>
   <container>1</container>
  </customwidget>

all works fine as expected except for a designer message being displayed when 
editing the ui file:

The file contains a custom widget 'VMCScrollArea' whose base class 
(QScrollArea) differs from the current entry in the widget database 
(VMScrollArea). The widget database is left unchanged.

Now i wonder: where does the information in the widget database come from and 
what can i do to fix this.
Or is this a bug that needs to be filed?

Best regards
Frank






More information about the Interest mailing list