PDA

View Full Version : RTF-Editor in custom widget QString - Property



micky
24th February 2013, 08:33
Hi,

I'm writing a custom widget which has a QString Property.

When I edit a QString of e.g. a QLabel Widget in QTDesigner, there is at the right of the edit field a small button with three dots, that opens a RTF-Editor.

In my custom widget this button is missing.

what do I have to do to get it?

TiA

Michael

micky
25th February 2013, 20:32
for anybody interested in this topic:

a


QString QmInfoPanelPlugin::domXml() const {
return "<ui language=\"c++\">\n"
" <widget class=\"QmInfoPanel\" name=\"qmInfoPanel\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>100</width>\n"
" <height>100</height>\n"
" </rect>\n"
" </property>\n"
" </widget>\n"
" <customwidgets>\n"
" <customwidget>\n"
" <class>QmInfoPanel</class>\n"
" <propertyspecifications>\n"
" <stringpropertyspecification name=\"test\" type=\"richtext\"/>\n"
" </propertyspecifications>\n"
" </customwidget>\n"
" </customwidgets>\n"
"</ui>\n";
}

will do the job

Hope it helps

Michael