1

I’m making an application where I’m converting a .xml to a .ui file (qtdesigner), and rendering that using pyqt.

However, there is some data in the .xml that I do not want to render (e.g. as metadata); and I need these data/variables/properties, to help parse the correct data using python on the pyqt side. How do I do this?

5
  • 1
    I'm not sure I've understood what your program does. If all happens within the same program, what's the point of generating a Designer UI file? Can't you just create the widgets directly? Please try to make yourself more clear. Commented Sep 16 at 13:38
  • @musicamante I’m told I need to allow the user the option to rearrange the widgets in qtdesigner. Hence why I’m converting the old xml file to .ui first. Commented Sep 16 at 14:40
  • In that case, the simplest solution would be to set dynamic properties for the widgets (or the top level widget), but that will expose them to the user as they're visible in the property editor of Designer, with the risk of users editing, invalidating or even removing them. The only other alternative I can think of is to use a custom widget as top level (created as a Designer plugin), which allows setting non designable properties. Commented Sep 16 at 16:49
  • This works, thanks. Commented Sep 17 at 9:02
  • You're welcome. Remember that you can click the "Answer your question" and provide your solution. Commented Sep 22 at 14:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.