Qt Designer plugin error
-
I've managed to compile the code from here: https://github.com/PacktPublishing/Cross-Platform-Development-with-Qt-6-and-Modern-Cpp/tree/master/Chapter03/MyWidgets
but under QT 5.14.2. My Qt Creator is version: 4.15.2, Deisgner is version as QT.
I have widget collection plugin:one custom Qframe, MyFrame and one custom QLabel,MyLabel.
I can use them (they are just skeletons basicaly,no useful code there). When I go to QtDesigner->Help-About Plugins->Refresh I get this error:
"The class attribute for the class Mylabel does not match the class name MyLabel."My Question is : "Which class attribute is this message referring to??".
I don't get it.Everything is labeled (where appropriate) "MyLabel".
My label domXml function is this:QString MyLabelPlugin::domXml() const
{
return QLatin1String("<ui language="c++" displayname="MyLabel"><widget class="Mylabel" name="Mylabel">\n\n<property name="geometry">\n<rect>\n<x>0</x>\n<y>0</y>\n<width>100</width>n\n <height>16</height>n\n </rect>\n</property>\n\n<property name="text">\n<string>myLabel</string>\n</property>\n\n</widget>\n</ui>");
} -
@QuteNewbie said in Qt Designer plugin error:
"The class attribute for the class Mylabel does not match the class name MyLabel."
Look at the spelling/capitalization of your two different spellings in the message and in the file you show....?
-
This is the culprit: displayname="MyLabel"><widget class="Mylabel" name="Mylabel"
Thanks. That does it! I have fixed the caps missmatch.