Qt Designer is unable to load the custom widgets (PyQt) widgets.
-
wrote on 6 Dec 2023, 04:38 last edited by
Hello,
I have a qt designer (built with version Qt-5.12.3) and it is able to load the custom widgets of PyQt-5.12.3. I have migrated the qt designer from Qt5.12.3 to Qt-6.4.0, now I am unable to load the same. I have shared the code snippet of the designer below. I am getting the "coll->customWidgets().count()" is zero ().
void QDesignerPluginManagerPrivate::addCustomWidgets(QObject *o, const QString &pluginPath, const QString &designerLanguage) { QDesignerCustomWidgetInterface *c = qobject_cast<QDesignerCustomWidgetInterface*>(o); if (c != nullptr) { addCustomWidget(c, pluginPath, designerLanguage); return; } const QDesignerCustomWidgetCollectionInterface *coll = qobject_cast<QDesignerCustomWidgetCollectionInterface*>(o); if (coll != nullptr) { QMessageBox::warning(0, QStringLiteral("coll->customWidgets().count()"), QString::number(coll->customWidgets().count()) ); foreach(QDesignerCustomWidgetInterface *c, coll->customWidgets()) addCustomWidget(c, pluginPath, designerLanguage); } }
But I have kept same PyQt6.dll in the designer's plugin directory of the actual Qt-6.4.0, then it is able to load. In mine migrated designer it is unable to load.
I have checked that the PyQt6.dll is loaded and instantiated properly. Kindly suggest.
Thanks
-
Hello,
I have a qt designer (built with version Qt-5.12.3) and it is able to load the custom widgets of PyQt-5.12.3. I have migrated the qt designer from Qt5.12.3 to Qt-6.4.0, now I am unable to load the same. I have shared the code snippet of the designer below. I am getting the "coll->customWidgets().count()" is zero ().
void QDesignerPluginManagerPrivate::addCustomWidgets(QObject *o, const QString &pluginPath, const QString &designerLanguage) { QDesignerCustomWidgetInterface *c = qobject_cast<QDesignerCustomWidgetInterface*>(o); if (c != nullptr) { addCustomWidget(c, pluginPath, designerLanguage); return; } const QDesignerCustomWidgetCollectionInterface *coll = qobject_cast<QDesignerCustomWidgetCollectionInterface*>(o); if (coll != nullptr) { QMessageBox::warning(0, QStringLiteral("coll->customWidgets().count()"), QString::number(coll->customWidgets().count()) ); foreach(QDesignerCustomWidgetInterface *c, coll->customWidgets()) addCustomWidget(c, pluginPath, designerLanguage); } }
But I have kept same PyQt6.dll in the designer's plugin directory of the actual Qt-6.4.0, then it is able to load. In mine migrated designer it is unable to load.
I have checked that the PyQt6.dll is loaded and instantiated properly. Kindly suggest.
Thanks
Did you compile the plugin with the same Qt version as designer?
-
Did you compile the plugin with the same Qt version as designer?
wrote on 6 Dec 2023, 06:37 last edited byThanks for reply.
Actually, I am trying to load pyqt6.4.0 custom widgets and I have built the PyQt6.4.0 with the Qt version 6.4.0
-
Thanks for reply.
Actually, I am trying to load pyqt6.4.0 custom widgets and I have built the PyQt6.4.0 with the Qt version 6.4.0
@Pradson This does not matter if you want to use it in designer. Please read my post. You have to use the same Qt version as the designer was built with.
-
@Pradson This does not matter if you want to use it in designer. Please read my post. You have to use the same Qt version as the designer was built with.
wrote on 7 Dec 2023, 04:37 last edited byYes, I have built the designer, plugins, and the PyQt-6.4.0 with the Qt version 6.4.0. But still, I am unable to load PyQt-6.4.0 custom plugins into the designer. Even, I have set all the environment variables properly.
Thanks,
-
Yes, I have built the designer, plugins, and the PyQt-6.4.0 with the Qt version 6.4.0. But still, I am unable to load PyQt-6.4.0 custom plugins into the designer. Even, I have set all the environment variables properly.
Thanks,
@Pradson said in Qt Designer is unable to load the custom widgets (PyQt) widgets.:
designer
You still not answered if designer was built with Qt 6.4...
Did you check that the plugin is in the correct place? Do you see your plugin in Help -> Plugins? -
@Pradson said in Qt Designer is unable to load the custom widgets (PyQt) widgets.:
designer
You still not answered if designer was built with Qt 6.4...
Did you check that the plugin is in the correct place? Do you see your plugin in Help -> Plugins?wrote on 7 Dec 2023, 07:04 last edited by@Christian-Ehrlicher said in Qt Designer is unable to load the custom widgets (PyQt) widgets.:
You still not answered if designer was built with Qt 6.4...
Yes, I have build the designer with Qt-6.4.0
Did you check that the plugin is in the correct place?
Yes, plugins are in correct place.Do you see your plugin in Help -> Plugins?
Yes, PyQt6.dll is loaded without pyqt plugins.Thanks.
1/7