0

I'm trying to deploy a QT/QML app on windows. The app works fine on my development environment but when i deploy it on a VM Windows machine, it didn't shows GUI so i traced the problem using Microsoft DebugView and found a solution here

By simply placing the below line, the problem is partially removed as now I can see GUI on my VM machine as well

qputenv("QT_QUICK_BACKEND","software");

But the gui has missing components i.e improper TextField shown below

enter image description here

If i comment out the above mentioned QT_QUICK_BACKEND line, the gfx is properly shown on my development machine but then it doesn't show gfx on my VM machine

enter image description here

What is causing this issue, and how should I resolve this problem ?

noob_user
  • 87
  • 7
  • That makes it sound like it can't find the direct3d libraries, so you have to tell it to use the software backend. – JarMan May 31 '23 at 13:08
  • @JarMan: When i use "QT_QUICK_BACKEND", the gfx are messed up as shown in the above screenshot. Alternatively, if i don't use it, the gfx doesn't show up on other machines, it only is visible on my development machine. Would appreciate help in this regard. thanks – noob_user Jun 01 '23 at 03:37
  • Yeah, I don't know why it looks messed up, but you don't want to use the software backend if you can help it. You need to figure out why it can't find the libraries it needs for the normal (direct3d?) backend. Might need to add an environment variable to tell it where to find them. I'm not a Windows expert, so I don't know for sure. – JarMan Jun 01 '23 at 12:35
  • Because it is a VM, and, because you're using Qt, have you tried Linux instead of Windows? – Stephen Quan Jun 06 '23 at 23:09
  • @StephenQuan: I've build the app on windows 10 machine and trying to deploye on another Windows 10 (VM) and Windows server 2012 R2 (VPS), doesn't work on both of these machine – noob_user Jun 08 '23 at 04:51
  • For barebones machines, you typically have modern graphics cards with decent OpenGL support. Because you're talking about a virtual environment the graphics driver is often virtual. Try setting the "QT_OPENGL" environment variable to "software". Also, you may have luck with changing the Graphics settings. I still recommend you test your app in Linux, since, you may find on the same VM environment, you get better/different experience. – Stephen Quan Jun 08 '23 at 05:10
  • @StephenQuan: I'm deploying this app on win10 VM. On the win10 VM, i have set this environment variable i.e. "QSG_RHI_PREFER_SOFTWARE_RENDERER=1" which solved the issue on windows 10 VM but the problem still exist when i try to deploy the app on Windows Server 2012 R2 (VPS). – noob_user Jun 08 '23 at 05:13

0 Answers0