[Qt-interest] Qt Designer Custom Widgets

Josh Knox jknox at irobot.com
Mon Nov 8 19:41:11 CET 2010


Alex Ivasyuv wrote:
> Hi,
>
> I need to implement customTextEditWidget of QTextEdit.
> I created custom class, which implements QTextEdit, called 
> CustomChatWindow (cpp & hpp files).
>
> Now I would like to use this custom class in QT Designer.
>
> I found in docs, that I could use "Promote" feature, but when I do 
> this, I get on app start the following error:
> "QFormBuilder was unable to create a custom widget of the class 
> 'CustomChatWindow'; defaulting to base class 'QTextEdit'."
>
> I think issue in name of header file that you have to clarify in popup 
> dialog
> http://doc.qt.nokia.com/4.7/images/designer-promoting-widgets.png 
> ("Header file").
>
> I have CustomChatWindow.hpp & CustomChatWindow.cpp. And they lies in 
> some subfolders.
> What should I pointed there? Relative or absolute path to header file? 
> Or maybe only here header file name? If so, related of what...
>
> I found here a video http://www.youtube.com/watch?v=Yt-YCxgEnyw, but 
> it's a custom widget created by Designer.
>
> Thanks,
>
>
>   

You want to make a QtDesigner plugin.

See this:

http://doc.qt.nokia.com/4.7/designer-creating-custom-widgets.html

and this example:

http://doc.qt.nokia.com/4.7/designer-customwidgetplugin.html



Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101108/a7941448/attachment.html 


More information about the Qt-interest-old mailing list