Results 1 to 17 of 17

Thread: about custom widget plugins

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default about custom widget plugins

    Hello,everyone. My Qt version is Qt3.3 . I have a problem,when I copy the "filechooser" example in Qt designer manual , run on my machine . I can find "libfilechooser.so" plugin in my /usr/lib/qt3/plugins/designer directory . but in Qt designer, I can't find that widget . Help me please , thank you!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: about custom widget plugins

    You have probably built it against a debug version of Qt and Designer uses release version of the library. Rebuild the plugin in release mode.

  3. #3
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default Re: about custom widget plugins

    Hello wysota,How to build Qt sources in release mode ?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: about custom widget plugins

    Add CONFIG+=release to the project file and make sure there is no CONFIG+=debug there. As for Qt itself, if you didn't compile it from scratch it should already be in release mode. If not, pass -release to configure and recompile.

  5. #5
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default Re: about custom widget plugins

    Hello wysota . This is my *.pro file:
    INCLUDEPATH += .

    # Input
    HEADERS += filechooser.h plugin.h
    SOURCES += filechooser.cpp plugin.cpp

    TEMPLATE = lib
    LANGUAGE = C++
    TARGET = filechooser

    DESTDIR = $(QTDIR)/plugins/designer

    target.path=$(QTDIR)/plugins/designer

    INSTALLS += target
    CONFIG += qt warn_on release plugin
    DBFILE = plugin.db
    I don't know why ,as if my Qt designer can't see the "/usr/lib/qt3/plugins/designer/libfilechooser.so" plugin,can you tell me how can I do?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: about custom widget plugins

    Try adding CONFIG += thread to your .pro file.

  7. #7
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default Re: about custom widget plugins

    It is still have this problem,Can someone give me a example? Thank you! hesummar@126.com

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: about custom widget plugins

    Quote Originally Posted by hesummar View Post
    It is still have this problem
    Did you add "CONFIG += thread" to your plugin's .pro file and recompiled it?

  9. #9
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default Re: about custom widget plugins

    Yes , really . My operation system is suse linux 10.1 .

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: about custom widget plugins

    Maybe Qt Designer doesn't look for plugins in that directory? Check "Plugin Paths" in Edit -> Preferences.

  11. #11
    Join Date
    Oct 2006
    Posts
    20
    Thanks
    2

    Default Re: about custom widget plugins

    I found that the Qt designer didn't look for plugins in that directory , after I edited the plugins paths , The Qt designer still didn't see that plugins , Please give me an example .

Similar Threads

  1. Replies: 1
    Last Post: 5th November 2006, 23:50
  2. Problem applying setWindowOpacity to a custom Widget
    By yellowmat in forum Qt Programming
    Replies: 8
    Last Post: 1st November 2006, 10:05
  3. Replies: 3
    Last Post: 12th April 2006, 08:20
  4. Replies: 4
    Last Post: 24th March 2006, 22:50
  5. How to reload widget plugins?
    By victorng in forum Qt Programming
    Replies: 2
    Last Post: 1st March 2006, 23:27

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.