Results 1 to 2 of 2

Thread: RTF-Editor in custom widget QString - Property

  1. #1
    Join Date
    Apr 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default RTF-Editor in custom widget QString - Property

    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

  2. #2
    Join Date
    Apr 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Smile Solved: RTF-Editor in custom widget QString - Property

    for anybody interested in this topic:

    a
    Qt Code:
    1. QString QmInfoPanelPlugin::domXml() const {
    2. return "<ui language=\"c++\">\n"
    3. " <widget class=\"QmInfoPanel\" name=\"qmInfoPanel\">\n"
    4. " <property name=\"geometry\">\n"
    5. " <rect>\n"
    6. " <x>0</x>\n"
    7. " <y>0</y>\n"
    8. " <width>100</width>\n"
    9. " <height>100</height>\n"
    10. " </rect>\n"
    11. " </property>\n"
    12. " </widget>\n"
    13. " <customwidgets>\n"
    14. " <customwidget>\n"
    15. " <class>QmInfoPanel</class>\n"
    16. " <propertyspecifications>\n"
    17. " <stringpropertyspecification name=\"test\" type=\"richtext\"/>\n"
    18. " </propertyspecifications>\n"
    19. " </customwidget>\n"
    20. " </customwidgets>\n"
    21. "</ui>\n";
    22. }
    To copy to clipboard, switch view to plain text mode 
    will do the job

    Hope it helps

    Michael

Similar Threads

  1. Custom Property On Custom Widget
    By Ashutosh2k1 in forum Qt Programming
    Replies: 29
    Last Post: 28th October 2014, 13:16
  2. Set property for custom plugin widget
    By koilin in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2012, 11:12
  3. Replies: 2
    Last Post: 19th September 2011, 07:56
  4. Replies: 3
    Last Post: 19th October 2006, 23:13
  5. Replies: 5
    Last Post: 16th May 2006, 21:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.