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
parent
c4ca781ce2
commit
deb5475b98
|
@ -175,6 +175,15 @@ void delay( int milliseconds )
|
||||||
|
|
||||||
int main(int argc, char * argv[])
|
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
|
// Create the QT application
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue