Custom Qt Widgets with python for Qt Designer

Woltan picture Woltan · Apr 16, 2013 · Viewed 7.9k times · Source

I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example.

So my questions are:

  1. What steps are involved to make a a custom widget appear in the Widget Box of Qt Designer?
  2. If you can spare the time: Please provide a minimum working example (like a widget with a label in it saying "A truly minimal working Qt custom widget example").
  3. Or is it maybe not possible at all to include a custom widget using only python?

Answer

scottydelta picture scottydelta · Apr 16, 2013

There are very few examples available on how to make a custom widget in pyqt. I wrote this article with a working example: Making a Custom Widget in PyQt