pygubu icon indicating copy to clipboard operation
pygubu copied to clipboard

Automatic Widget Integration UI files

Open moefear85 opened this issue 5 months ago • 1 comments

It would be very useful if, once a specific "ui" file is designed, that it automatically appear as an integrated Widget in the Widgets pane that is then drag/droppable into any new ui file being designed, thus become a component of it. The name of the widget would be taken from the ui file itself. There is no need to define any additional plugin code, because unlike custom classes (in the sense of being unknown/foreign Python class definitions), the compound ui "widget" is full known and understood by pygubu because it was designed in pygubu itself. Even if that ui file used custom widgets, those widgets would have already been integrated into pygubu before that.

This way entire frames for specific functions can be designed then immediately reused as components in other frames or top levels, including all their existing logic. The ui file would simply be dropped or linked into a specific folder that pygubu automatically searches, and any subdirectories would appear as sub-groups in the widgets pane.

moefear85 avatar Aug 05 '25 15:08 moefear85

Hello @moefar85, thanks for trying pygubu.

I'm trying to improve the CustomWidget template that will make easy to implement part of your requirements.

With the latest version, it's possible to design the app's main screen by dividing it into reusable components and implementing them with the CustomWidgets template. See this comment

However, manual modifications to the generated files are still required for them to work properly.

The next version will include important changes that will improve this process.

Regards Alejandro A.

alejandroautalan avatar Aug 07 '25 03:08 alejandroautalan