[Solved]Deployment of a Qt application with combining OpenGL and QPainter

  • I built a Qt application on Window 7 with Visual Studio 2010. I can successfully run the exe with VS2010 (work well with OpenGL and QPainter. I used OpenGL to draw the 3D objects and QPainter to draw the background). But when I deploy it, I found that no 3D objects are rendered (Background has no problem). Did I miss something important in the exe folder ? The folder structure is like this


  • Thanks. I checked with dependency walker, seems nothing missed. I profiled the program and some lines are highlighted. Is that relevant?

    @GetProcAddress(0x74CF0000 [KERNEL32.DLL], "GetCurrentPackageFamilyName") called from "NVD3DUM.DLL" at address 0x6BE95AAE and returned NULL. Error: w{C (127).
    GetProcAddress(0x74CF0000 [KERNEL32.DLL], "GetCurrentPackageFamilyName") called from "NVD3DUM.DLL" at address 0x6BE95AAE and returned NULL. Error: w{C (127).@

  • Hi, googling those highlighted lines, it seems it's from a Nvidia graphics driver complaining about not finding a Windows 8 API ("GetCurrentPackageFamilyName").

    Maybe try upgrading the graphics driver on the PC you're deploying to.

  • I updated my graphics driver (GTX780), but it still cannot render any model by OpenGL.

  • Thank you guys. I solved the problem this morning.
    The reason is that I copied the dlls from [..\Qt5.2.1\Tools\QtCreator\bin], but I should copy from [..\Qt5.2.1\5.2.1\msvc2010_opengl\bin]. The version is different in two folders. :P

  • Aha! I know before that if you installed Qt for the MingGW compiler, you couldn't use the .dlls in \Tools\QtCreator\bin for deployment, because QtCreator is built using VS2010.

    But you installed Qt for VS2010, so the dlls should be compatible, or not. Because probably QtCreator is built using the vanilla Qt VS2010 version and you installed and used the Qt VS2010 OpenGL version?

    (The reason I'm asking, I'm writing a blog post on "my blog":http://www.tripleboot.org about deployment pitfalls, and this is one of them :-)

  • I installed two things on my computer (Window 7 64-bit).

    1. Qt 5.2.1 for Windows 32-bit (VS 2010, OpenGL, 517 MB)
    2. Visual Studio Add-in 1.2.2 for Qt5

    hope this information is helpful to you :)

Log in to reply