Qt Desktop Components - build for MS Windows



  • Hello,

    please, could anyone help me with building Qt Desktop Components for Qt 4.8.4 on MS Windows 7? (I don't know how much backwards compatible Qt 5.0 is)

    I know this is not the best favor to ask and not the safest solution, but could anyone compile it (at least for 32bit) and upload the build?

    I developed my application in Linux (GNU/Linux, Qt 4.8.4 since Qt 5 is not as default in any distribution) environment but the target is both Linux and Windows. I compiled and used the desktop components on Linux without any problem, but I cannot figure out how to make this successfully in Windows. It compiles perfectly with 'qmake && mingw32-make && mingw32-make install' (or with the 'release' option) but then it is not recognized as an installed module for import (even though the libraries are in the correct path - i.e. C:\Qt\4.8.4\imports). If I import it directly as a path from my app, then it complains about styleplugin.dll not being a valid Qt module.

    The reason why I am asking for a favor rather than an advice is I have tried every solution I have found on the Internet and I think that since Qt Desktop Components for Qt 4 have not been updated since June of 2012 (yet working perfectly), I think that it is logical to post an official build (even if labeled as alpha) based on the last git revision. Also, MS Windows is too confusing for me and compilation procedure that would take few commands on Linux takes ages there.

    Or is there another possible solution? Can styleplugin.dll be omitted since all the other files are independent on the environment? I don't care about not having the native look on Windows, but I do not want to reinvent the wheel by reimplementing all these components by myself.

    Thank you, in advance. As you can see, I am quite desperate.

    Links:
    http://qt.gitorious.org/qtplayground/qtdesktopcomponents
    http://qt.gitorious.org/qtplayground/qtdesktopcomponents/trees/qt4


  • Moderators

    welcome to devnet

    As it looks you do not use Qt creator as an IDE for your development. This may make life a bit easier than using plain qmake and the compiler.

    You may have a mixture of different Qt versions accessible through your environment's path setting. If you have applications accessible through the path you may mix up different things. You can use the "dependency walker ":http://www.dependencywalker.com/ for checking out the different versions your application is loading.

    For easier working and understanding I would recommend copying the required dlls by hand to the exe and try to start. In general there are your own application dlls, if any, the Qt dlls and possibly some compiler specific dll(s). The general windows specific system dlls it will anyway.



  • Thanks for your answer, but my problem doesn't have much to do with the way I develop.
    I don't use Qt Creator that often, since I usually use PySide (Python+Qt+QML combination) which isn't really well integrated to the IDE.

    However, the same problem happens when I create a new (C++ or plain QML) example app in Qt Creator on Windows - as I described, if I import it the regular way, it does not find it, if I add it to the path, qmlviewer crashes saying it (compiled styleplugin.dll) is not a valid Qt module.

    [quote author="koahnig" date="1363009036"]...For easier working and understanding I would recommend copying the required dlls by hand to the exe and try to start... [/quote]

    I probably didn't make myself clear - my problem is in compilation of Qt Desktop Components - I built the dll but it doesn't work - if anyone has this one dll from Qt Desktop Components working, I'd be very thankful for uploading it somewhere.

    The thing you're suggesting is mentioned in my first post (import through path) and it results in "styleplugin.dll is not a valid Qt module" message and a crash afterwords. I also don't have any problems with multiple Qt versions as you mention - I use stable Qt 4.8.4 and Qt Desktop Components for Qt 4 with it


  • Moderators

    [quote author="nodevel" date="1363011864"]Thanks for your answer, but my problem doesn't have much to do with the way I develop.
    I don't use Qt Creator that often, since I usually use PySide (Python+Qt+QML combination) which isn't really well integrated to the IDE.
    [/quote]
    I thought so. I have changed recently from msvc to qt creator as ide and it is always a bit of hazzle until you are comfortable.

    [quote author="nodevel" date="1363011864"]However, the same problem happens when I create a new (C++ or plain QML) example app in Qt Creator on Windows - as I described, if I import it the regular way, it does not find it, if I add it to the path, qmlviewer crashes saying it (compiled styleplugin.dll) is not a valid Qt module.
    [/quote]

    You do not write anything about the compiler version you are using.
    AFAIK if you use the downloaded Qt 4.8.4 pre-build those are still compiled with MinGW 4.4. MinGW 4.4 compiler is very hard to find for download. If you have installed MinGW not very long ago, you probably have a much younger version. Those might not be compatible ( I am not sure of MinGW 4.4 and 4.6). However, MinGW 4.7.2 is different.

    The only other recommendation I can make is using the dependency walker. It typically tells you quite a lot of what and where it has been found.



  • I honestly think that it has nothing to do with the Qt Creator experience (I just tried compiling it in Qt Creator and it compiles without a problem, but then still does not work), but compiler version, that might be the problem, you might be right - my version of the compiler (MinGW) is from June 2012 while 4.4 is almost four years old.

    Actually, that is why I asked for a favor rather than an advice - there have to be people developing for Windows in QML and then they most likely have a build (binary) of Qt Desktop Components they could share (even in an official manner).
    Or everyone who wants to develop in QML for Windows desktop needs to obtain obscure, 4 years old libraries and dive into Windows' dependency hell just to get the basis for their app? I thought that the components are in place exactly for this reason - to enable faster development across platforms.

    Sorry, I don't want to be rude, I am thankful for those advices... But I just don't understand Windows' environment (and that is why I develop in system agnostic Python+QML) - for example I am a maintainer of Qt Desktop Components in Chakra Linux ( http://chakra-linux.org/ccr/packages.php?ID=4676 ) and my build provides these components in a simple install for everyone who wants to develop. I just believe there's someone willing to do the similar favor for others on another system.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.