Results 1 to 4 of 4

Thread: Custom widget not visible in Integrated designer of Qt Creator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Custom widget not visible in Integrated designer of Qt Creator

    Quote Originally Posted by yogeshgokul View Post
    There could be many reasons for this.
    1. Your plugin is not properly exported, please refer the code of Analog clock for example.
    -- If the plugin is not exported properly, Does it still show up in the plugin information ?

    2. In doXML function of your plugin class, try to change the group and other properties.
    -- I commented out this section to return only a simple string. I will see if that was causing the problem.

  2. #2
    Join Date
    Jul 2009
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Thumbs up Re: Custom widget not visible in Integrated designer of Qt Creator

    Yup! It was because I had commented out the code in domXml (). The plugin became visible. After this there was a small problem because because the actual widget itself wasn't displayed when I dropped it into a form. In the terminal, I got this message :
    Designer: The class attribute for the class MyClock does not match the class name NewPlugin.
    Designer: A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class NewPlugin. It returned a widget of class MyClock.
    I went through the code again and realized that the name () was returning the name of the plugin class rather than the widget class. I changed this and everything started working properly. Thanks!

Similar Threads

  1. Cannot add custom widget to Qt Creator
    By djogon in forum Qt Tools
    Replies: 5
    Last Post: 30th April 2010, 10:15
  2. Custom widget - Only works in Designer
    By Darhuuk in forum Qt Tools
    Replies: 6
    Last Post: 8th January 2008, 00:46
  3. Replies: 4
    Last Post: 24th March 2006, 22:50
  4. Replies: 4
    Last Post: 1st March 2006, 23:11
  5. Replies: 4
    Last Post: 6th February 2006, 14:30

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
  •  
Qt is a trademark of The Qt Company.