PDA

View Full Version : Custom Widget



Ashutosh2k1
11th February 2011, 07:24
Hi
I have created the custom widget through the qt creator Template Like Create Custom widget . For just checking i have created a very simple cusom widget with doing nothing. Now i just need that custom widget to appear in qt designer form when i have compiled that custom widget .But it is not showing there. what would be the Problem i am using all the simple ssetting provided by the Qt Creator
Hoping for a quick reply
Thanks

Lykurg
11th February 2011, 07:54
You can either use "Promote to" or write a plugin with the custom widget for Qt Designer. There is an example in the docs on how to do that.

Ashutosh2k1
11th February 2011, 08:08
HI
I have done all these i have read the sample example like analog Clock and all still i am not able to do this ,maybe i am missing very simple thing .Now i am writting the steps which i have followed
1. I have created the Custom widget through Qt creator New File ->Other Project ->Qt Custom Designer Widget
2 . I compile and Build the the Project
3. when i search the lib an dll file in designer it is notshowing there
becoz if it is innstalled hen it should come in the designer folder so what would be the Problem .

pan
11th February 2011, 09:28
I posted something about this before...
is this what you want:
http://www.qtcentre.org/threads/36341-custom-widget-plugin-example-HOWTO-on-Windows-with-QtCreator

If you are on windows and your designer is built using msvc compiler then your plugins need to be compiled with the same compiler and in the same mode (release most likely). Then you just need to place the dll in the bin/designer dir.

As mentioned, there are example of how to do this. But just check for errors like I suggested in the other post and you should see what you are doing wrong

Ashutosh2k1
11th February 2011, 10:01
Thanks
Hi BUt when i am creating the Custom widget and manually put the dll and lib file in designer and check the form options it is not showing the custom widget as loaded Plugin.So the Problem is that the custom widget is not created at that time or Proper plugin is not created .
Hoping for more reply

pan
11th February 2011, 10:14
You should only need the dll.
What directory (exactly) are you placing your plugin dll?

Ashutosh2k1
11th February 2011, 10:30
Thanks Pan ,
Suppose i have created the custom widget through the qt creator . The created Custom widget is doing nothing so all the Project Setting is as default now i put the realease dll into the folder where the qt is installed like in my case it is "C:\Qt\2010.05\qt\plugins\designer".Now i am going to check whether the Custom widget has been created like plugin i create a form and check for form options so in this case it is showing nothing So can u tell whether i am doing right for creating the Custom widget

pan
11th February 2011, 10:33
Try placing it here:
C:\Qt\2010.05\bin\designer

See what you get then.

Ashutosh2k1
11th February 2011, 10:51
Very Very Thanks Pan
In this time for It actually have come.However it shows as
Failed Plugin
(The Path of Plugin in this case C:\Qt\2010.05\bin\designer\pluinName)
The Plugin (with full name ) use incomplete Qt Lib Expected Build Key 'Windows msvc release full config' got 'Windows mingw release full config'
So what i have to do now

Hope for ur quick reply

pan
11th February 2011, 11:12
Don't know what happened to my reply then... just disappeared.

In short: You need to use the msvc compiler (Microsoft Visual C++). Search the forums for a "how to" I think there are lots.

It is on the lines of downloading the correct Qt Library and the msvc compiler. Then setting it up in your options and telling your project to use that setup.

It is simple once it is all in place.

Ashutosh2k1
11th February 2011, 11:29
Thanks
Now i going to search that Part
Thanks Once again

Radioguy00
14th February 2011, 15:41
Does it mean that when the SDK 2010.05 binaries are installed on windows, the QtCreator is a version which had been compiled with MSVC++ and consequently any plugin created with mingw32 does not load?

What puzzles me is that the Nokia web site seems to imply that it is a mingw32 version because the fine print on the SDK Windows download states :
"*Based on MinGW (download sources) tool set. Does not include VS compiler."


Thanks

Ashutosh2k1
16th February 2011, 07:35
Hi Pan

If i am using visual studio 2008 and visual studio plugin then where i have to place my dll