Results 1 to 17 of 17

Thread: Empty window when running application on Windows XP 32 bits

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Empty window when running application on Windows XP 32 bits

    What Qt libraries have you deployed with the exe?

    Are you using the ANGLE build of Qt5 or an OpenGL build? The ANGLE build has issues on XP.
    http://qt-project.org/wiki/Qt-5-on-W...GLE-and-OpenGL
    I think that imposes some limits on QtQuick2.

  2. #2
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    I'm using an Open GL build, but I did not any Open GL stuff directly.
    Are you suggesting to use Qt Quick 1 for Windows Xp deployment?

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Empty window when running application on Windows XP 32 bits

    I am not a Qt QML or Quick user, so I have no direct experience. Perhaps someone who does is better qualified to answer.

    Looking back at your file list:
    • You do not need to deploy the debug Qt libraries, e.g. QtCore5d.dll, for the typical release build. This also applies to the imageformats/ and platforms/ folders.
    • You only need to deploy the Qt DLL files (core or plugin) your program actually uses. Most of the imageformats and platforms DLLs are unnecessary.
    • Do not deploy the intermediate *.o files
    • You should not need the images/ or qml/ folders because these should be built into your executable by the Qt Resources system.


    The image file names in your resource file do not match those in your directory structure. I cannot tell if that is significant.

    How do you reference the QML file in your program? What path do you use to load it?

  4. #4
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    Sorry for late reply,
    To reference main QML I'm using:
    Qt Code:
    1. viewer.setSource(QUrl("qrc:/qml//Rename_Files/main.qml"));
    To copy to clipboard, switch view to plain text mode 
    and to reference images from qml:
    Qt Code:
    1. "qrc:/images/file_browser_icon_32x32.png"
    2. "qrc:/images/file_renamer_icon_32x32.png"
    To copy to clipboard, switch view to plain text mode 

    About unnecessary files: I knew some of them where unnecessary, but I didn't know which ones since I'm it's my first deploy, so I addeed them all. Sadly, didn't help at all.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Empty window when running application on Windows XP 32 bits

    Is the double "//" deliberate?

  6. #6
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    This is a bit embarrassing, yes should have been only one "/".
    It's just a typo. When I tried first the Qt Resource System I didn't know how to refer to files, and you'll my tries from main.cpp:
    Qt Code:
    1. #include <QtGui/QGuiApplication>
    2. #include <QQuickItem>
    3. #include <QResource>
    4. #include "qtquick2applicationviewer.h"
    5. #include "renamer.h"
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QGuiApplication app(argc, argv);
    10.  
    11. QResource::registerResource("resource_file.qrc");
    12. QtQuick2ApplicationViewer viewer;
    13. viewer.setSource(QUrl("qrc:/qml/Rename_Files/main.qml"));// .setMainQmlFile(QStringLiteral("qrc:///Rename_Files/main.qml"));//setSource(QUrl("qrc://qml/Rename_Files/main.qml"));// .setMainQmlFile(QStringLiteral(":/Rename_Files/main.qml"));
    14. viewer.showExpanded();
    15.  
    16. Renamer renamer;
    17. QObject *root = viewer.rootObject();
    18. QObject::connect(root, SIGNAL(rename_signal(QString)), &renamer, SLOT(rename_filesSLOT(QString)));
    19.  
    20. return app.exec();
    21. }
    To copy to clipboard, switch view to plain text mode 

    I did build the project as it is now. On Windows 8 works just fine:
    windows8_files.png
    program.png
    Then tried my luck on Windows XP, here's the result:
    windowsXP_files.jpg
    platforms_folder.jpg
    trying_to_run_Rename_files.exe.jpg
    Also I tried with Dependency Walker, it shows the same as the image in the post above.
    I did copy all required files, I did use Qt Resource System.
    What am I doing wrong?

  7. #7
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    I don't know how or what I did, but I don't have that plugin error anymore.
    Anyway, I did again a release. I've put these files:
    files.jpg
    and when I run it, the "magic" white rectangle appears.
    I tried again to run it from cmd, as you suggested, Chris, and here is the result:
    app_running.jpg
    and again Dependency Walker:
    dependency_error.jpg

    That MPR.dll seems to be inside Qt5Core.dll. What's wrong with Qt5Core.dll? Is there a problem with the file on Windows XP?

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Empty window when running application on Windows XP 32 bits

    Mpr.dll is part of Windows and a Dependency Walker warning is typical on XP and can be ignored.
    http://www.dependencywalker.com/faq.html

    Remove the registerResource() call from your main(). The qrc file and the files it references are built into the exe when the qrc is listed in the RESOURCES qmake variable in your pro file.

    Try a do-nothing QML example like the one on this page
    http://qt-project.org/doc/qt-5.0/qtq...eployment.html

  9. The following user says thank you to ChrisW67 for this useful post:

    athan_david (20th October 2013)

  10. #9
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    Chris, as you did suggest, I created a project with this main.qml :
    Qt Code:
    1. import QtQuick 2.0
    2.  
    3. Rectangle {
    4. width: 100
    5. height: 100
    6. color: "red"
    7. }
    To copy to clipboard, switch view to plain text mode 
    and this is the main.cpp:
    Qt Code:
    1. #include <QtGui/QGuiApplication>
    2. #include "qtquick2applicationviewer.h"
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QGuiApplication app(argc, argv);
    7.  
    8. QtQuick2ApplicationViewer viewer;
    9. viewer.setSource(QUrl("qrc:/qml/DeploymentProjectTest/main.qml"));
    10. viewer.showExpanded();
    11.  
    12. return app.exec();
    13. }
    To copy to clipboard, switch view to plain text mode 
    And these are the results:
    Windows 8 Pro:
    windows_8_DPT_screenshot.png
    Windows XP:
    windows_xp_DPT_screenshot.jpg
    Attached Images Attached Images

  11. #10
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    I did continue with research and install Windows 7 and XP on virtual machines.
    As I found Qt Quick 2.0 is using Open GL to draw elements (but on deployment machine, Open GL 2.0 at least is required) and Qt Quick 1.0 is using QPainter (correct me if I am wrong).
    I did create project as Qt Quick 2.0 project and also did check if deployment machine does have support for Open GL 2.0 at least video card driver is up to date. Everything is good.
    Just in case I did create the project as Qt Quick 1.0 on Windows XP inside virtual machine and tried again. Big surprise same issue.

    Somehow on Windows 8 I did manage to recreate de bug using Qt. When I ran the app, I was complaining about QtQuick module, folder list module module and that QtObject cannot connect signals with slots because rootObject is null.
    Through a bit research I found that QML_IMPORT_PATH enviroment variable might be the issue. I did try to set it but no effect at all.

    If you know what's wrong please give me a hint.
    Or if you know a tutorial or topic about how to deploy an app please share it.

    Thanks for your effort!

  12. #11
    Join Date
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Empty window when running application on Windows XP 32 bits

    Hi again guys,

    Today in a few hours I finally solved this problem and I thought about sharing what information I got meanwhile.
    I was always getting a blank white window because the app was searching for some files but couldn't find them.
    It was strange that on development machine everything was working. So I came with idea to add an "_" to the Qt's folder name (like "C:\Qt_"), then rerun app. Voila! blank white window. Revert renaming and start "digging" for a specific folder by adding the "_". I found that app was looking for these 2 folders:
    C:\Qt\Qt5.1.1\5.1.1\mingw48_32\qml\QtQuick.2 -- http://qt-project.org/doc/qt-5.1/qtd...t-windows.html didn't mention about this
    C:\Qt\Qt5.1.1\5.1.1\mingw48_32\qml\Qt -- why this folder? because I am using folderlistmodel.

    Now my app with these files works charm:
    Qt Code:
    1. Rename Files
    2. + platforms
    3. - qwindows.dll
    4. + Qt
    5. + labs
    6. + folderlistmodel
    7. - plugins.qmltypes
    8. - qmldir
    9. - qmlfolderlistmodelplugin.dll
    10. + QtQuick.2
    11. - plugins.qmltypes
    12. - qmldir
    13. - qtquick2plugin.dll
    14. - icon_rc_res.o
    15. - icudt52.dll
    16. - icuin51.dll
    17. - icuuc51.dll
    18. - libgcc_s_dw2-1.dll
    19. - libstdc++-6.dll
    20. - libwinpthread-1.dll
    21. - main.o
    22. - moc_qtquick2applicationviewer.o
    23. - moc_renamer.o
    24. - qrc_resource_file.o
    25. - Qt5Core.dll
    26. - Qt5Gui.dll
    27. - Qt5Network.dll
    28. - Qt5Qml.dll
    29. - Qt5Quick.dll
    30. - Qt5Script.dll
    31. - Qt5V8.dll
    32. - qtquick2applicationviewer.o
    33. - Rename Files.exe
    34. - rename.o
    To copy to clipboard, switch view to plain text mode 

    On deployment "dig" method works!

    Chris, Thanks a lot for your help!

  13. #12

    Default Re: Empty window when running application on Windows XP 32 bits

    I have been working a similar issue myself, and I'm not sure if it's QtQuick 2.0 related or not. Right now I can run stand alone on my development machine... however, I am using VirtualBox to run another Windows 7 32 Bit machine, and when I run the application there, it crashes. This is one step more than if the plugin dlls aren't loaded... at that point I simply get a white box (as does everyone else who doesn't have the plugins loaded and in the right spot).

    I'm curious if anyone else has had this behavior? It's completely repeatable with a mingw or visual studio build. I haven't tested 64 bit as of yet, but I'm going to.

    I'm using the openGL-desktop build, so I'm assuming (hopefully) that ANGLE isn't the problem. Or maybe openGL is the problem? Has anyone else been able to successfully run this scenario?

    1) Qt 5.2.0 - OpenGL - MingW4.8.6 or visual studio 2010
    2) Windows 7 32 bit virtual box machine
    3) QtQuick 2.0

    Crashes every time - with no warnings or output.

    Thanks,
    JaegerBomb

Similar Threads

  1. Replies: 7
    Last Post: 6th March 2013, 03:26
  2. Replies: 3
    Last Post: 26th September 2012, 07:52
  3. Hiding any running Application icon on windows task bar
    By nagabathula in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2012, 07:11
  4. Application 32/64 bits with VS2005/Qt 4.3
    By mourad in forum Installation and Deployment
    Replies: 0
    Last Post: 21st February 2012, 10:39
  5. Replies: 9
    Last Post: 4th November 2011, 16:56

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.