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
    Sep 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Empty window when running application on Windows XP 32 bits

    Hi,

    I know that it's a long post, but I think it's the only way to explain what I did.

    I want to deploy my application on Windows XP SP 3 32 bits to rename files in a spefic way which I need.
    My development machine has Windows 8 Pro 64 bits and I'm using Qt 5.1 with MinGW 4.8 32 bits.
    For UI I'm using qml, and for the back-end (application logic) I'm using Boost libraries (I know that I can rename files with Qt sdk, I used a library for learning purposes; and I was right, took me some time until I got it right).
    On the deployment side I did:
    - build application on release
    - copy required .dll from <compiler>/bin/;
    - copy folder <compiler>/plugins/platforms.
    But this was not enough (I think), I could run the application but I was getting an empty small window. I read again the deployment page and I found that I was not using the Qt Resource System (I thought that .exe file couldn't file main.qml). I did refactoring to make use of Qt Resource System, build again, copy on the deployment machine and try again. And again empty window.
    Lastly I used Dependency Walker to check If I am missing something, and here is what was showing:
    Attachment 9598
    On deployment machine I did install VC Redistributable, but didn't solve the problem.
    I tried to find other option on my friend Google, but didn't find an answer.

    If you know or have an idea what's wrong, please spend 2 minutes to give me a hint!
    Also, if there is other specific information which is required please tell me.

  2. #2
    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

    Sorry, invalid attachment.

    The Visual C++ redistributable is not necessary for a MingW executable.
    You can ignore IESHIMS.DLL which is often listed as missing.
    If your program is running but not functioning correctly then it is not missing any hard dependencies. It may be missing some or all of the Qt plugins required for image formats, etc.

    Run the program with a console and see if any warnings are issued.

  3. #3
    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

    Thanks for reply,
    Firstly, I'm sorry for attachment. Here is a valid one dependency_error.jpg.
    Forgot to mention that I did copy image plugins, they are located in plugins/imageformats.
    Did open a cmd and ran app from there, sadly it did not help me with errors or warnings. Here is the results of cmd:
    <prompt>:.\application.exe
    "\n"(writen by app or sth else)
    <prompt>: (here app is running with an empty window).

  4. #4
    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

    The plugins should be in the folder "imageformats" relative to the location of the executable: i.e. no intervening "plugins" folder.

  5. #5
    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 move the folder as you said, but nothing changed.

    I think it's better to tell you which files are in which folder:

    Qt Code:
    1. C:\Program Files\Rename Files\
    2. + imagesformats
    3. - qgif.dll
    4. - qgifd.dll
    5. - qico.dll
    6. - qicod.dll
    7. - qjpeg.dll
    8. - qjpegd.dll
    9. - qmng.dll
    10. - qmngd.dll
    11. - qsvg.dll
    12. - qsvgd.dll
    13. - qtga.dll
    14. - qtgad.dll
    15. - qtiff.dll
    16. - qtiffd.dll
    17. - qwbmp.dll
    18. - qwbmpd.dll
    19. + platforms
    20. - qwindows.dll
    21. - qwindowsd.dll
    22. - qminimal.dll
    23. - qminimald.dll
    24. - qoffscreen.dll
    25. - qoffscreend.dll
    26. + images
    27. - browser_icon.png
    28. - rename_icon.png
    29. + qml
    30. + Rename_Files
    31. - Button.qml
    32. - main.qml
    33. - icudt51.dll
    34. - icuin51.dll
    35. - icuuc51.dll
    36. - libgcc_s_dw2-1.dll
    37. - libstdc++6.dll
    38. - libwinpthread-1.dll
    39. - main.o
    40. - moc_qtquick2applicationviewer.o
    41. - moc_renamer.o
    42. - qrc_resource_file.o
    43. - Qt5CLucene.dll
    44. - Qt5CLucened.dll
    45. - Qt5Concurrent.dll
    46. - Qt5Concurrentd.dll
    47. - Qt5Core.dll
    48. - Qt5Cored.dll
    49. - Qt5Declarative.dll
    50. - Qt5Declaratived.dll
    51. - Qt5Designer.dll
    52. - Qt5Designerd.dll
    53. - Qt5Gui.dll
    54. - Qt5Guid.dll
    55. - Qt5Help.dll
    56. - Qt5Helpd.dll
    57. - Qt5Multimedia.dll
    58. - Qt5Multimediad.dll
    59. - Qt5MultimediaQuick_p.dll
    60. - Qt5MultimediaQuick_pd.dll
    61. - Qt5MultimediaWigets.dll
    62. - Qt5MultimediaWigetsd.ll
    63. - Qt5Network.dll
    64. - Qt5Networkd.dll
    65. - Qt5OpenGL.dll
    66. - Qt5OpenGLd.dll
    67. - Qt5PrintSupport.dll
    68. - Qt5PrintSupportd.dll
    69. - Qt5Qml.dll
    70. - Qt5Qmld.dll
    71. - Qt5Quick.dll
    72. - Qt5Quickd.dll
    73. - Qt5QuickParticles.dll
    74. - Qt5QuickParticlesd.dll
    75. - Qt5QuickTest.dll
    76. - Qt5QuickTestd.dll
    77. - Qt5Script.dll
    78. - Qt5Scriptd.dll
    79. - Qt5ScriptTools.dll
    80. - Qt5ScriptToolsd.dll
    81. - Qt5Sensors.dll
    82. - Qt5Sensorsd.dll
    83. - Qt5SerialPort.dll
    84. - Qt5SerialPortd.dll
    85. - Qt5Sql.dll
    86. - Qt5Sqld.dll
    87. - Qt5Svg.dll
    88. - Qt5Svgd.dll
    89. - Qt5Test.dll
    90. - Qt5Testd.dll
    91. - Qt5V8.dll
    92. - Qt5V8d.dll
    93. - Qt5WebKit.dll
    94. - Qt5WebKitd.dll
    95. - Qt5WebKitWidgets.dll
    96. - Qt5WebKitWidgetsd.dll
    97. - Qt5Widgets.dll
    98. - Qt5Widgetsd.dll
    99. - Qt5Xml.dll
    100. - Qt5Xmld.dll
    101. - Qt5XmlPatterns.dll
    102. - Qt5XmlPatternsd.dll
    103. - Rename_Files.exe
    104. - renamer.o
    To copy to clipboard, switch view to plain text mode 

    And this is resource_file.qrc:
    Qt Code:
    1. <RCC>
    2. <qresource prefix="/">
    3. <file>qml/Rename_Files/Button.qml</file>
    4. <file>qml/Rename_Files/main.qml</file>
    5. <file>images/file_browser_icon_32x32.png</file>
    6. <file>images/file_renamer_icon_32x32.png</file>
    7. </qresource>
    8. </RCC>
    To copy to clipboard, switch view to plain text mode 

    Yet, when I'm running Rename_Files.exe I get a window like square with an edge of 100, white background and truncated title.
    Also, why is Dependency Walker complaining about MPR.dll? I tried to cheat: download it from google and put in the C:\Program Files\Rename Files\, but did not have ant effect.
    Last edited by athan_david; 18th September 2013 at 19:29.

  6. #6
    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.

  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'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?

  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

    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?

  9. #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

    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.

  10. #10
    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?

  11. #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

    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?

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.