Pyqt not working on Nano

I’m trying to get a QT creator designed GUI working on Nano with a python code. but it’s complaining

(python3.6:18572): GLib-GObject-WARNING **: 19:25:03.988: cannot register existing type 'GdkDisplayManager'

(python3.6:18572): GLib-CRITICAL **: 19:25:03.988: g_once_init_leave: assertion 'result != 0' failed

(python3.6:18572): GLib-GObject-CRITICAL **: 19:25:03.988: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(python3.6:18572): GLib-GObject-WARNING **: 19:25:03.988: invalid (NULL) pointer instance

(python3.6:18572): GLib-GObject-CRITICAL **: 19:25:03.988: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(python3.6:18572): GLib-GObject-WARNING **: 19:25:03.988: invalid (NULL) pointer instance

(python3.6:18572): GLib-GObject-CRITICAL **: 19:25:03.988: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(python3.6:18572): GLib-GObject-WARNING **: 19:25:04.001: cannot register existing type 'GdkDisplay'

(python3.6:18572): GLib-CRITICAL **: 19:25:04.001: g_once_init_leave: assertion 'result != 0' failed

(python3.6:18572): GLib-GObject-CRITICAL **: 19:25:04.001: g_type_register_static: assertion 'parent_type > 0' failed

(python3.6:18572): GLib-CRITICAL **: 19:25:04.001: g_once_init_leave: assertion 'result != 0' failed

(python3.6:18572): GLib-GObject-CRITICAL **: 19:25:04.001: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

It might be the problem with gtk? but i have no idea how to fix this.

Hi,
For building/installing Qt, we have verified the steps in


FYR. We don’t try pyqt. May need other users to share experience.

ok, so I tried:

sudo apt-get build-dep qt5-default
sudo apt install libcanberra-gtk-module
sudo apt install qt5-style-plugins 
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> ~/.profile

Then the problem solved… maybe this post can help:

Hi,
Much appreciation for the sharing. Thanks.