Multipage Qt container widgets problem solved

In relation to what I wrote earlier I am happy to say that it seems that finally the problem of UIC not being able to handle custom container widgets has been solved – at least partially.

I’ve been playing with Qt 4.4 Technical Preview and I noticed that finally the issue of being unable to create correct Designer forms with multipage widgets has a solution.

In your domXml() method of the custom widget plugin you need to inform UIC about the name of the method your class uses to add pages to itself. The solution is limited as it expects the name of a method taking a pointer to QWidget only, but at least that will render containers usable.

To have a working container widget plugin you need to make sure domXml() returns something like the following:


  
    QwwNavigationBar
    QWidget
    addWidget
  

This informs UIC that QwwNavigationBar is a widget derived from QWidget that uses QwwNavigationBar::addWidget() for adding pages.

Leave a Reply