Results 1 to 2 of 2

Thread: Adding Custom Widgets to the QT Designer

  1. #1
    Join Date
    May 2010
    Posts
    41
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Adding Custom Widgets to the QT Designer

    Hi,

    I've only started working with QT just over two weeks ago, but have learned quite a bit in that time. At the moment, I'm trying to create custom widgets which will show up in the QT Designer widget list.

    I followed a number of online tutorials, and have only come across problems.

    In starting a new "Qt4 Designer Custom Widget" in the QT Creator, it seems that most of the work is already done for me. Originally, I tried this, and added some code to my actual widget, without touching the plugin itself. Despite the fact that the end of my project file specified:

    target.path = $$[QT_INSTALL_PLUGINS]/designer
    INSTALLS += target


    While everything built fine, the files were not copied to that directory. Even in specifying the actual directory as opposed to using the variable QT_INSTALL_PLUGINS, they weren't copied. I then manually copied the *.a and *.dll files to the directory, and ran QT Designer.

    The first time I did this, it actually worked! I soon realized that I'd forgotten to add some things, so I made some changes to the code, re-compiled, copied into the folder, and suddenly, each time I ran QT Designer, I got the "designer.exe has encountered a problem and needs to close" Windows dialog. Even when I reverted to my original working code, this happened, and has continued to since.

    I've played a lot with the build configuration, and, as I said, followed some tutorials, making minor changes here and there. But nothing has worked. I'm wondering first about why the files would not be copied to the designer directory...but in general, why I can't get any of it to work! Any help would be greatly appreciated! Thanks.

  2. #2
    Join Date
    May 2010
    Posts
    41
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding Custom Widgets to the QT Designer

    Okay, so I just decided to do it all myself from scratch following this link:

    http://doc.qt.nokia.com/4.6/designer...ockplugin.html

    And it actually worked! Well, I still had to manually copy the files to the qt/plugins/designer directory. But either way, it did work.

    Sorry for the trouble!

Similar Threads

  1. Replies: 5
    Last Post: 19th April 2010, 00:31
  2. Adding widgets in Designer
    By franco.amato in forum Newbie
    Replies: 3
    Last Post: 21st December 2009, 14:43
  3. Replies: 0
    Last Post: 15th May 2009, 16:38
  4. Replies: 4
    Last Post: 2nd December 2008, 05:19
  5. Global includes with designer custom widgets
    By mab in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2006, 23:06

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.