[SOLVED] customize QtableWidget with Qdesigner
-
Aloha,
Well there are basically two ways you can do it.
-
Write a class which extends the QTableWidget with all your customizations. And then just add the QTableWidget in your designer and promote it to your custom class. You can do it by right clicking the widget and clicking Promote to and entering the name of your class.
-
Is slightly more complicated, but if you had done quick Google search you would find "this example":http://qt-project.org/doc/qt-4.8/designer-creating-custom-widgets.html
With the second approach you're actually making a plugin for the designer.
I've written a plugin only once, most of the times, promoting widgets to my class is good enough.
Happy Coding.
-
-
Ok i have figured out what you mean
go to Qtcreator " Edit code area"
1- create Extends class form desired widget
2- make your custimisation on .cpp
go to "Design aread -- Qt designer "
right click on desired widget and hit promote then chose the header file of your custom widget