Results 1 to 4 of 4

Thread: Interesting installation problem

  1. #1
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    39
    Thanks
    15
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Interesting installation problem

    Okay so after rereading a few installation guides of the move your dll's her, there and everywhere I decided that I actually needed to follow Uwe's INSTALL guide so that the qwt libs etc are kept seperate from the Qt install. Should add that I am on a window7 32 bit machine running windows XP.

    With that in mind I decided to delete any qwt.dll, qwtd.dll, qwt*designer.dll's that I had scattered through the Qt install (in only 2 directories actually, the /bin and /designer directories). I should add that this way did let me see the qwt widgets in the creator.

    So I
    1) recompiled qwt with mingw to make it compatible with my Qt version and Qt Creator version and installed it, via the INSTALL instruction in my C:\ directory.
    2) Set the QMAKEFEATURES (this all showed up so all good so far)
    3) created a new windows environment variable called QT_PLUGIN_PATH and set it to the plugin directory of my QWT install
    4) started up Qt Creator (I am using Qt 4.7.4 I think it is, and Qt Creator 2, either way they are not a problem, nor is QWT really) and loaded my project, which has the CONFIG +=qwt in the PRO file
    5) went to the form editor within creator and lo and behold my qwt widgets had gone. No problem. Wasn't to concerned (still not actually)
    6) built my project anyway and was pleased to see that the QWT plots were in the application anyway. So I conclude that my QMAKEFEATURES setting has worked. So onto the designer/creator issue and this is where it gets interesting (at least I think it does)

    If I place the qwt.dll and qwtd.dll (built both release and debug, built the release separately to ensure everything was correct) in the Qt bin directory (as I had in my bad install which worked) and then restart Qt creator the widgets show up again in the creator (form creator) with all the Qt widgets. And if I look at the loaded plugins then I can see that the qwt_designwer plugin is in fact being found in my qwt install directory as per the QT_PLUGIN_PATH variable. So I could leave it at that, but this is not the correct way to install.

    However, if I remove the dll's from the bin directory the plugin doesn't load and shows up as a failed plugin e.g. it cant find the qwt.dll's. So I am thinking that I have done something stupid somewhere. It appears that the even though Qt looks for the qwt_designerplugin.dll in the correct directory (my qwt install directory via the QT_PLUGIN_PATH variable) it is trying to find the rest of the qwt dll's needed for the plugin in the actual Qt bin directory?

    Is this simply a change I need to make in the qwt.prf and/or qwtconfig.pri files? or is it something else?

    Cheers
    Oz
    Last edited by OzQTNoob; 1st February 2012 at 12:21. Reason: added OS and windows version etc.

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

    Default Re: Interesting installation problem

    Quote Originally Posted by OzQTNoob View Post
    However, if I remove the dll's from the bin directory the plugin doesn't load and shows up as a failed plugin e.g. it cant find the qwt.dll's. So I am thinking that I have done something stupid somewhere.
    DLLs are found using the PATH variable. You have to add the path for Qwt libraries there.

    Uwe

  3. #3
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    39
    Thanks
    15
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Interesting installation problem

    Hi Uwe,

    I did actually add the following to my path variable C:\qwt-601\lib (or however the qwt directory looks) but when I look in the build properties in my project it doesn't list the qwt directory at all. I may need to brush up on my PATH directory bits-and-pieces as there are a number of paths listed but not all of them show up. I dont really care about the ones that are not needed, but I will recheck tomorrow when I get back in front of my work computer and see if I have entered something incorrectly.

    Cheers
    Oz

  4. #4
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    39
    Thanks
    15
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs up Re: Interesting installation problem

    Hi Uwe,

    After checking I have confirmed that I have set my PATH environment variable to C:\Qwt-6.0.1\lib and if I run the designer (not Qt Creator) that comes with the Qt (e.g. C:\Qt\4.7.4\bin\designer.exe) then I can see the Qwt widgets. So a good result and ultimately the correct one as everything is actually working as it should e.g. the Qwt dll's are not embedded in the Qt distribution.

    However, if I want to see the same widgets in the form editor of Qt Creator (e.g. C:\Qt\Qtcreator\bin\qtcreator.exe) then it would appear that it does not know about the same PATH environment variable as the designer. I am guessing this is because the designer is part of the Qt distribution while the Qt Creator is separate from that, even though it references the Qt libraries etc.

    Any suggestions as to what I have done wrong or what I should change so that the Qt Creator form editor can also display the Qwt widgets? Any help you can offer is appreciated Uwe.

    Cheers
    Oz


    Added after 4 minutes:


    Okay I have solved the problem. Firstly, just so people know what I mean when I start Qt Creator I am starting it via the Qt 4.7.4 command prompt e.g. first I cd to the creator bin directory cd c:\Qt\QtCreator\bin then I am running the creator qtcreator.exe and off I go.
    When the command prompt is started it shows me a little list of mingw/Qt environment variables that it sets up. The file that is responsible for this is qtvars.bat in the C:\Qt\4.7.4\bin directory (on my computer anyway) So I simply added the following line into the qtvars.bat file after the other PATH declarations,

    set PATH=%PATH%;C:\Qwt-6.0.1\lib

    and now the Qt Creator also displays the Qwt widgets in its embedded designer. WIN!

    Why it see's this PATH (which has been declared in the windows PATH environment variable : see post above) when I run Qt's standalone designer but doesn't seem to register it when I run Qt Creator from the Qt command prompt is unknown. But a simple addition has now solved it. I will write the entire process up as an INSTALL explanation for Windows7 XP if people would like so that they can install Qwt as Uwe has intended (at least for windows7 XP 32bit). With that said Uwe's INSTALL file may seem sparse to people like me that are not well versed in doing such things (I am a Winblows point and click guy) but it is in fact accurate and I can see why he gets frustrated by the move the dll's here and there threads.

    P.S is their a way to add [SOLVED] to the thread title?
    Last edited by OzQTNoob; 2nd February 2012 at 03:54.

Similar Threads

  1. Replies: 1
    Last Post: 19th August 2011, 20:26
  2. Why could be interesting to use MSVC and QT ?
    By tonnot in forum Installation and Deployment
    Replies: 13
    Last Post: 9th October 2010, 10:53
  3. signal -slot mechanism!! an interesting problem!!!
    By qt_user in forum Qt Programming
    Replies: 6
    Last Post: 5th August 2010, 11:20
  4. Replies: 4
    Last Post: 3rd August 2010, 12:30
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 11:24

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.