You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Thursday, March 1st 2012, 3:17am

Putting a custom widget in designer

Hi, this may sound like a really, really stupid question. But how exactly does one integrate a custom widget into designer? I've been trying to go at it for a while just using the qt documentation (which, frankly, hasn't been very helpful) and now matter what i do the widget never shows up. I'm not sure if it has anything to do with the .pro file, the way i'm compiling it, or if my code's faulty(which i do doubt, not because of narcissism, but because the code is really simple). I'm willing to post the code if need be, but i'd like hear to what anyone has to say before I do. Any help would be immensely appreciated.


Wednesday, August 15th 2012, 6:12pm

You can do this in two ways:

1. Using the Designer

Using Third Party Widget on Qt

2. By code
You need to include the file of your widget onto your widget, after that you need to call to the custom widget by doing

Declaring the widget in the header file:

Source code

CustomWidget *Cwidget;

And Declaring the widget in the cpp file:

Source code

CustomWidget Cwidget = new CustomWidget();