Sorry my solution is for Qt4, I just noticed you are using Qt3.
Anyway for folks that read this thread and are using 4 here is a clarification.
In designer, with your form open, right click the widget in the form.
The context menu from right clicking should look like this:
Change objectName
Change toolTip
Change whatsThis
------------------
Promote to Custom Widget
------------------
Cut
Copy
...
Change objectName
Change toolTip
Change whatsThis
------------------
Promote to Custom Widget
------------------
Cut
Copy
...
To copy to clipboard, switch view to plain text mode
Select "Promote to Custom Widget". A dialog will appear where you can put in the name of the derived class and a header that defines it.
You can edit the ui manually to achive the same effect. Try something like this:
<ui version="4.0" >
<class>Dialog</class>
<widget class="QDialog" name="Dialog" >
<property name="windowTitle" >
<string>Dialog</string>
</property>
<widget class="QTableView" name="tableView" >
</widget>
<widget class="myCustomTable" name="customTableView" >
</widget>
</widget>
<customwidgets>
<customwidget>
<class>myCustomTable</class>
<extends>QTableView</extends>
<header>mycustomtable.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
</ui>
<ui version="4.0" >
<class>Dialog</class>
<widget class="QDialog" name="Dialog" >
<property name="windowTitle" >
<string>Dialog</string>
</property>
<widget class="QTableView" name="tableView" >
</widget>
<widget class="myCustomTable" name="customTableView" >
</widget>
</widget>
<customwidgets>
<customwidget>
<class>myCustomTable</class>
<extends>QTableView</extends>
<header>mycustomtable.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
</ui>
To copy to clipboard, switch view to plain text mode
Bookmarks