How do I make custom widgets/promote widgets for Qt designer using Pyside

  • Hello, I'm trying to figure out how to make a custom widget work in Qt designer, however I don't exactly know c++ very well, so I was hoping I could try doing it in python. The problem is, I can't find any relevant documentation relating to making custom widgets with pyside and using them with Qt designer. For example, I want to have 2 buttons and have each set the current index of the stacked widget they are in to a different number (Button 1 sets the page to 2, while button 2 sets the page to 5), and I could do this with some sort of custom button widget.

  • Lifetime Qt Champion

    Disclaimer. I have not tried it.

    However, from a quick browse in google, it seems like the same as with c++

  • I've managed to get it to work, I needed to convert the ui file to .py for whatever reason, thank you for the help!

    Edit: For those trying to do this in the future, make sure that when you put in the python file into the header input, you don't put the .py at the end, as it literally takes that letter for letter and converts it to an import statement when you convert the ui to a py file.

Log in to reply