On certain linux operating systems, Qt application exits with an error

message such as 'X Error: BadDrawable'.

In order to resolve the issue, we need to let the Qt know not to load
the MIT-SHM extension.

Reference:
https://iwf1.com/quick-fix-one-kdes-common-xorg-errors-x-error-baddrawable/
REL-1_X
Neel Patel 2017-08-09 16:11:44 +05:30 committed by Ashesh Vashi
parent c4ca781ce2
commit deb5475b98
1 changed files with 9 additions and 0 deletions

View File

@ -175,6 +175,15 @@ void delay( int milliseconds )
int main(int argc, char * argv[])
{
/*
* Before starting main application, need to set 'QT_X11_NO_MITSHM=1'
* to make the runtime work with IBM PPC machine.
*/
#if defined (Q_OS_LINUX)
QByteArray val("1");
qputenv("QT_X11_NO_MITSHM", val);
#endif
// Create the QT application
QApplication app(argc, argv);