Reputation: 481
I have developed one sample Qt application. My application runs only when we execute below command in terminal first.
export QT_X11_NO_MITSHM=1
If we don't export above variable and start application ( "./test") then it open the window but it has some paint rendering issue.
Can anyone suggest, how can we set this variable from application itself rather then externally set from terminal ?
Thanks in Advance.
Upvotes: 0
Views: 11939
Reputation: 11754
I'd recommend using qputenv()
to add it before you create the QApplication
in main()
. Some of the ENV vars
must be set before Qt begins loading due to them being used in global state, I'm not sure if the X11
ones will work with qputenv()
but that's the best way to introduce them in the codebase. QtGlobal::qputenv documentation.
Upvotes: 2