Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. GLib-GObject Warning and Errors when I merge two working app made using QTCreator on a Raspberry Pi
Forum Updated to NodeBB v4.3 + New Features

GLib-GObject Warning and Errors when I merge two working app made using QTCreator on a Raspberry Pi

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 995 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Knox
    wrote on last edited by
    #1

    I have two application that was created using QTCreator (Qt Creator 4.2.0 Based on Qt 5.7.1) ony my Raspberry Pi 3 Model B+ (Raspbian 9.6 stretch).

    The first application is a Non-qt Plain C++ Application that uses opencv. Where the application would do face detection. The second application is a QT Widgets Application where I have just some QDialogs.

    Both applications build and run on the pi. They run perfectly and do what they're supposed to do. Though the QT Widget Application gives this warning during runtime:

    libEGL warning: DRI2: failed to authenticate
    qt5ct: using qt5ct plugin
    

    But it still works very fine.

    The problem comes when I merge this two application. Even when I'd just put these lines:

    INCLUDEPATH += "/usr/local/include/opencv4"
    LIBS += `pkg-config --libs opencv4`
    

    on the .pro file of my QT Widget Application so that I can use opencv on that application it gives me these warnings and errors:

    libEGL warning: DRI2: failed to authenticate
    qt5ct: using qt5ct plugin
    
    (rpi2:1613): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'
    
    (rpi2:1613): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
    
    (rpi2:1613): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'
    
    (rpi2:1613): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
    
    (rpi2:1613): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
    
    (rpi2:1613): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
    
    (rpi2:1613): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
    

    I tried researching about it and what I found out that the possible reason for this could be when QT was upgraded to 5.7.0-1, the widget style GTK is not available for QT5 apps (I saw it here). And the workaround for this would be to put this QT_STYLE_OVERRIDE=gtk2 or this QT_QPA_PLATFORMTHEME=gtk2 on my /etc/environment then reboot. But both of them didn't work.

    What do I need to do to solve this problem?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved