0

I want to include designs to my current UI from another UI using QTdesigner

  • Please clarify what you mean by "include designs". Do you want to add a child widget that uses "another" UI? How are using UI files? Do you build them with `pyuic` or do you use `uic.loadui`? Please try to be more clear in your questions, also please take your time to review the [tour] and read [ask]. – musicamante Sep 21 '21 at 11:40
  • I am using pyuic . I have header and footer and i want to import them to current ui – Suryakanta Maharana Sep 21 '21 at 11:41
  • Please share the `ui` files and the main script. – musicamante Sep 21 '21 at 11:45
  • Qt Designer doesn't directly support this. You can [add custom widgets using promotion](https://stackoverflow.com/q/42054131/984421), but that will only show an empty placeholder in Designer itself. To embed a fully viewable/editable custom widget would require [creating a custom plugin](https://www.riverbankcomputing.com/static/Docs/PyQt5/designer.html#writing-qt-designer-plugins). If your other ui is quite complex, that could require quite a lot of work - so it probably wouldn't be worth the effort unless you expect to re-use the plugin in a lot of different projects. – ekhumoro Sep 21 '21 at 12:26
  • @ekhumoro the question is a bit confused, it's not clear if the OP actually wants to embed the *other* UI directly in Designer (like you point out) or if they just want to be able to use the other components at runtime (so, widget promotion, which is what I thought in the first place). – musicamante Sep 21 '21 at 12:28
  • 1
    @musicamante I gave both options. They both amount to the same thing. The only difference is that promotion doesn't show the results in Qt Designer itself, which was the main point of my comment. This sort of question isn't new. There will be numerous duplicates that essentially cover the same ground (like almost every question on SO these days). – ekhumoro Sep 21 '21 at 12:53

0 Answers0