Results 1 to 11 of 11

Thread: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

  1. #1
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    Hello,

    I'm using QtCreator IDE installed from a binary downloaded from Qt. However I would like to use some Qwt widgets in my projects and would like to have them displayed in the Widget bar in Creator so I can drop-and-drag them into my forms.

    I've downloaded the source for Qwt and it 'appears' that the necessary plugins to integrate with Creator are built when building the Qwt libraries, but I'm not sure. The instructions are a little vague and I'm no expert at this.

    Could anyone help me please ? How can I integrate Qwt widgets so that they appear in Creator for me to drag-and-drop ?

    Many thanks

    Kerubu

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    a) See http://doc.qtsoftware.com/4.5/plugins-howto.html
    Check the section starting with "But where is the plugins directory ?".

    b) Try ldd on the Qwt designer plugin in the same shell, where you start the creator and check if the Qwt library can be found

    c) Enable QT_DEBUG_PLUGINS and you should see debug messages from
    the creator on your console.


    HTH,
    Uwe

  3. #3
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    Thanks Uwe,

    However I'm still as confused as I was before. I think the link you gave was to application plugins whereas I need to create a 'custom widget' (my terminology incorrect in my post ? ) I did find a link on the page you referred to though, although I still haven't managed to get qwt to integrate with creator. I've looked at the .pro files for qwt and there does appear to be commands to build plugins/custom widgets... al the correct macros and class interfaces are included. But as to how I get Creator to find them I don't know

    Creator is great once it works,but getting it to work on linux is the problem. The instructions are a bit vague for linux and you almost have to have an in depth knowledge of Qt to install it.. which sadly I do not have

    Ah well maybe I'll jsut have to try hard-coding the stuff

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    However I'm still as confused as I was before. I think the link you gave was to application plugins whereas I need to create a 'custom widget'
    Qt creator is a Qt application itsself and the Qwt designer plugin is the application plugin the creator has to load. The link shows how any Qt application finds plugins, what is the same what the creator does to find the Qwt designer plugin.

    Uwe

  5. #5
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    I'm sorry to be a pain Uwe but I'm no further forward. This is what I have done :

    1) Built qwt as described in the INSTALL file. This has resulted in a directory '/usr/local/qwt-5.2.0' underneath which is directories for doc, include and lib. There also appears to be libqwt_designer_plugin.so in the directory '/usr/lib/qt4/plugins/designer' (I assume this is the plugin I Creator has to load so that qwt widgets appear in the toolbar ?)

    2) I incuded the following in my .profile :
    Qt Code:
    1. QT_DEBUG_PLUGINS=1
    2. export QT_DEBUG_PLUGINS
    3. QT_PLUGIN_PATH="/usr/lib/qt4/plugins/designer" # Point toward qwt plugin ?
    4. export QT_PLUGIN_PATH
    To copy to clipboard, switch view to plain text mode 

    3)When starting up ./qtcreator from shell gives this output :
    Qt Code:
    1. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/sqldrivers/libqsqlite.so"
    2. keys ("QSQLITE")
    3. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/iconengines/libqsvgicon.so"
    4. keys ("svg", "svgz", "svg.gz")
    5. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/iconengines/libqsvgicon.so"
    6. keys ()
    7. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqgif.so"
    8. keys ("gif")
    9. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqico.so"
    10. keys ("ico")
    11. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqjpeg.so"
    12. keys ("jpeg", "jpg")
    13. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqmng.so"
    14. keys ("mng")
    15. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqsvg.so"
    16. keys ("svg")
    17. QFactoryLoader::QFactoryLoader() looking at "/home/kerubu/qtsdk-2009.03/bin/imageformats/libqtiff.so"
    18. keys ("tiff", "tif")
    To copy to clipboard, switch view to plain text mode 

    5)QtCreator is installed in '~/qtsdk-2009.03/bin'. I tried
    Qt Code:
    1. ldd qtcreator.bin
    2. linux-gate.so.1 => (0xb7f0f000)
    3. libExtensionSystem.so.1 => /home/kerubu/qtsdk-2009.03/bin/../lib/qtcreator/libExtensionSystem.so.1 (0xb7ee8000)
    4. libAggregation.so.1 => /home/kerubu/qtsdk-2009.03/bin/../lib/qtcreator/libAggregation.so.1 (0xb7ee3000)
    5. libQtGui.so.4 => /home/kerubu/qtsdk-2009.03/bin/../lib/libQtGui.so.4 (0xb74e2000)
    6. libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb745b000)
    7. libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb741d000)
    8. libSM.so.6 => /usr/lib/libSM.so.6 (0xb7414000)
    9. libICE.so.6 => /usr/lib/libICE.so.6 (0xb73fc000)
    10. libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb73f1000)
    11. libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb73c4000)
    12. libXext.so.6 => /usr/lib/libXext.so.6 (0xb73b4000)
    13. libX11.so.6 => /usr/lib/libX11.so.6 (0xb72c5000)
    14. libQtNetwork.so.4 => /home/kerubu/qtsdk-2009.03/bin/../lib/libQtNetwork.so.4 (0xb71a0000)
    15. libQtCore.so.4 => /home/kerubu/qtsdk-2009.03/bin/../lib/libQtCore.so.4 (0xb6f4a000)
    16. libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb6f44000)
    17. librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb6f3b000)
    18. libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb6e83000)
    19. libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6e7f000)
    20. libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb6e65000)
    21. libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6d76000)
    22. libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6d50000)
    23. libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6d41000)
    24. libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb6bde000)
    25. libQtXml.so.4 => /home/kerubu/qtsdk-2009.03/bin/../lib/qtcreator/../libQtXml.so.4 (0xb6b96000)
    26. libz.so.1 => /lib/libz.so.1 (0xb6b80000)
    27. libpcre.so.3 => /lib/libpcre.so.3 (0xb6b4e000)
    28. libuuid.so.1 => /lib/libuuid.so.1 (0xb6b49000)
    29. libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6b22000)
    30. libXau.so.6 => /usr/lib/libXau.so.6 (0xb6b1d000)
    31. libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6b03000)
    32. /lib/ld-linux.so.2 (0xb7f10000)
    33. libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6afe000)
    To copy to clipboard, switch view to plain text mode 

    But I'm not sure if that is what you meant in your earlier post. If it is, then as you can see qwt is not listed.

    Finally you should know I installed the SDK as a binary rather than build individually the Qt libraries and Creator.

    Sorry to be a pain but I'm really confused about how to get plugins working.

  6. #6
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    OK I've spent the whole day and evening trying unsuccessfully to get Qwt to work with the latest Creator 1.2.1

    I found that there is an Ubuntu package for creator 1.0.0 and that qt4.5.0 is automatically installed when installing Ubuntu although the package for creator is only available for Ubuntu 9.04. I need Qt for both 8.10 and 9.04 so I tried installing the package on my 9.04 machine. I also found that Qwt runtime is also automatically loaded when installing Ubuntu but not the development package, so I installed that.. and low and behold there are the Qwt widgets in Creator 1.0.0 !

    So with fresh enthusiasm I attempted to build and install the Qt example customwidget.. and success.. the widget appears on the toolbar !!

    So then I tried to build qwt from source. I first removed the development package then followed the instructions as given in the INSTALL file.

    FAIL ! No Qwt widgets at all.

    I then tried various things all to no avail, then I thought perhaps it has something to do with the versions on Qt and Qwt runtimes, so I removed all traces of Qt and Qwt Ubuntu packages, and installed the SDK. First running the binary to install Creator and then building from source Qt itself.

    I then tried a clean build of Qwt from the source, checkin the .pro and .pri files which appeared to be ok. Did a 'make install' then run Creator. Guess what ?

    NOTHING.

    Checked the plugin directory for the qwt '/usr/local/Trolltech/Qt-4.5.2/plugins/designer/ and there's the plugin.

    Next I thought I'd try to build the example from before.. the simple custom widget. Checked the directory as above.. and there's the plugin. The I realised that's the plugins for Qt.. I need to check the plugins for Creator, which are under a different directory, and sure enough the plugin is missing. So a quck change to 'target.path' to point at the plugin directory for Creator, re build and there it is in Creator !

    So I changed the target.path in designer.pri to that one too.. guess what..

    NOTHING !

    The plugin appears in the directory but no widgets in Creator ?

    Why is it so hard to install Qwt ???????

  7. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    Quote Originally Posted by Kerubu View Post
    I tried
    Qt Code:
    1. ldd qtcreator.bin
    To copy to clipboard, switch view to plain text mode 
    But I'm not sure if that is what you meant in your earlier post. If it is, then as you can see qwt is not listed.
    Of course you have to check the plugin not the creator binary. Try "ldd /../../libqwt_designer_plugin.so".
    If the Qwt library is not resolved you have to set the LD_LIBRARY_PATH ( or see man ldconfig ).

    Also check the log messages of the creator about the directory of the Qwt designer plugin.

    Uwe

  8. #8
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    OK Finally success !

    Qt Code:
    1. ldd libqwt_designer_plugin.so
    To copy to clipboard, switch view to plain text mode 

    resulted in :

    Qt Code:
    1. libqwt.so.5 => not found
    To copy to clipboard, switch view to plain text mode 

    Well had to do a bit of reading around to get an understanding of libraries etc and static and shared libraries and to comprehend what 'LD_LIBRARY_PATH' does.

    Unfortunately setting 'LD_LIBRARY_PATH' in ~/.profile in Ubuntu doesn't work, as described here. Trying various things didn't work except setting LD_LIBRARY_PATH on the command line e.g. :

    Qt Code:
    1. export LD_LIBRARY_PATH=/usr/local/qwt-5.2.0
    To copy to clipboard, switch view to plain text mode 

    As this must be done manually at every login I don't regard this as a satisfactory solution, so I simply changed the qwtconfig.pri to install the libraries in standard linux locations :

    Qt Code:
    1. ...
    2. unix {
    3. #Change the the install base to standard Linux locations otherwsie LD_LIBRARY_PATH needs
    4. #to be defined but this environment variable doesn't work - bug #366728 or security measure ?
    5. #INSTALLBASE = /usr/local/qwt-5.2.0
    6. INSTALLBASE = /usr
    7. }
    8.  
    9. win32 {
    10. INSTALLBASE = C:/Qwt-5.2.0
    11. }
    12.  
    13. target.path = $$INSTALLBASE/lib
    14. headers.path = $$INSTALLBASE/include
    15. #doc.path = $$INSTALLBASE/doc
    16. doc.path = /usr/local/qwt-5.2.0/doc
    17. ...
    To copy to clipboard, switch view to plain text mode 

    I also altered the designer.pro file as the plugin didn't seem to appear in the plugin directory, so I manually added the full target.path :

    Qt Code:
    1. target.path = /home/kerubu/qtsdk-2009.03/bin/designer
    To copy to clipboard, switch view to plain text mode 

    Now everything works !

    Uwe, as this seems to be a problem with Ubuntu you might want to put some link on your home page to this posting or I can send you a list of steps that I took to get Qwt working :o)

    Thanks for keeping on nudging me in the right direction, at least I understand more now about shared libraries !

  9. #9
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    As this must be done manually at every login I don't regard this as a satisfactory solution, so I simply changed the qwtconfig.pri to install the libraries in standard linux locations :
    Or check the man page of ldconfig. Another option is to set LD_LIBRARY_PATH in your ~/.xinitrc.
    Uwe, as this seems to be a problem with Ubuntu you might want to put some link on your home page to this posting or I can send you a list of steps that I took to get Qwt working )
    Well a missing configuration of the dynamic loader is not a problem of the distribution. IMHO the source of the problem is the Qt creator/designer, that silently ignores the plugins leaving the user without any hint.

    Uwe

  10. #10
    Join Date
    Nov 2009
    Location
    PL
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    Where You add this line? To which file?


    Qt Code:
    1. target.path = /home/kerubu/qtsdk-2009.03/bin/designer
    To copy to clipboard, switch view to plain text mode 

    I Try use Your solution to run QT with QWT but i still have error :
    error while loading shared libraries: libqwt.so.5: cannot open shared object file: No such file or directory

  11. #11
    Join Date
    Aug 2009
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can install Qwt & integrate with QtCreator on Ubuntu Linux ?

    Quote Originally Posted by UsenetCoder View Post
    Where You add this line? To which file?


    Qt Code:
    1. target.path = /home/kerubu/qtsdk-2009.03/bin/designer
    To copy to clipboard, switch view to plain text mode 

    I Try use Your solution to run QT with QWT but i still have error :
    error while loading shared libraries: libqwt.so.5: cannot open shared object file: No such file or directory
    From here :

    I also altered the designer.pro file as the plugin didn't seem to appear in the plugin directory, so I manually added the full target.path :

    Qt Code:
    1. target.path = /home/kerubu/qtsdk-2009.03/bin/designer
    To copy to clipboard, switch view to plain text mode 

  12. The following user says thank you to Kerubu for this useful post:

    UsenetCoder (14th November 2009)

Similar Threads

  1. Replies: 0
    Last Post: 14th May 2009, 12:31
  2. qwt 5.2 install on qt 4.5
    By HyperB in forum Qwt
    Replies: 4
    Last Post: 13th May 2009, 21:03
  3. Replies: 4
    Last Post: 1st April 2009, 17:28
  4. qwt polar dev on intrepid ubuntu??!?
    By telecompress in forum Qwt
    Replies: 2
    Last Post: 10th February 2009, 10:59
  5. Replies: 3
    Last Post: 13th December 2008, 11:33

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.