Run Qt in Linux
-
Hi, experts,
I am facing a problem, I wrote a program, it was OK on my development machine.
But When I put it on a test machine, it can be run, but no GUI shows up when I using a normal account. If I changed to the ROOT user, everything is fine.
What I missed? I thought my test environment is the same as the development environment. Same OS and same LD_LIBIRARY_PATH, etc...
Please help me. Thanks a lot~
-
@laozeng1982
You are supposed to deploy your application from development to another machine, e.g. withlinuxdeployqt
.Nobody will be able to answer why a second machine seems to require root user instead of normal one from the description you have given. If you have not done so already, run your application from a terminal/command prompt on the second machine and see whether there is maybe some diagnostic output written to it when you invoke the Qt application.
-
Thanks for your reply.
I do run the program in second machine in terminal, but no more information output, even my debug output in the program I wrote not display in the terminal.
Do we have a method to get the output by Qt application with setting some envioronment variables?
Another question, I tried use the linuxdeployqt to depoly my program, but it seems not functionly work, it says my GLIBC is too high. But I have to run my program on RHEL 7.9.
Thanks
-
@laozeng1982
Write a one program which just creates aQWIdget
andshow()
s it beforeapp.exec()
. Try that. Find out whether no Qt program runs or whether it's something in your actual application.