Is there a way to easily change the base class of a Qt Designer Form Class?

I created a new custom widget using Qt Creator's "Add New...->Qt->Qt Designer 
Form Class" wizard.  At the time, I chose "Widget" as my form template.  So at 
the end of that sequence I ended up with myWidget.h, myWidget.cpp, and 
myWidget.ui.  I then added some code.  Then I realized that I should have had 
the custom widget inherit from QFrame, not QWidget.  Is there an easy way to 
make that switch now that code is already written?

In the .h and .cpp file, it'd be trivial to do a find & replace of QWidget -> 
QFrame, but I'm not seeing an easy way to change the base widget type in the 
designer UI using the UI controls.  I'm assuming I could hack the raw XML in 
the .ui file and change the line:
  <widget class="QWidget" name="myWidget">
To:
   <widget class="QFrame" name="myWidget">

But that seems like a bit of a hack, and maybe that's not even sufficient?
Sean
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to