PDA

View Full Version : QUiLoader and custom widgets containing custom widgets



QuantumState
23rd June 2010, 23:32
Qt 4.6.2, MSVS C++ 2008

I'm trying to use QUiLoader to load a custom widget that contains other custom widgets. When run, the console gives:

QFormBuilder was unable to create a custom widget of the class 'SubCustomWidget'; defaulting to base class 'QWidget'.

I have all the plugin directories added correctly as near as I can tell and my custom widgets work fine in QtDesigner, so I think they are created correctly. When I call QUiLoader's availableWidgets() function however, none of my custom widgets are listed.

I read another thread that said something about creating a custom loader class by inheriting QUiLoader and re-implementing the createWidget() function, but that seems like a lot of work to get custom widgets into my application when getting them into Designer was so easy, plus, it means I have to go edit the custom loader class every time I build a new custom widget. I was wondering if there is some other trick I'm missing...

- Aaron

learningqt
18th July 2012, 10:59
was the problem solved??? I have the same problem