Qt 5.6 and GLIB (event loop)
-
Hi all,
I have a little problem, but I think I can fix it with community :)
I try porting my Windows Qt application on Linux.
My application use QCamera, and as I can see QCamera on linux works with gstreamerOk, I build Qt on linux (Ubuntu 10.04) with GCC/G++ 4.8.1 and gstreamer 0.10, and when I run my program I see that GLIB is not initialized correctly because Qt doesn't call init function glib (g_object_init), but this function is deprecated in glib 2.36 (maybe less). After this error my app is hanging
Now, I try build glib 2.50.1 on Ubuntu 10.04 and distribute my app with this version (My application started with LD_LIBRARY_PATH=<path to Qt>:<path to newer version GLIB>). And now I have new trouble, that my application QDesktopService::openUrl() doesnt work, and I don't understand why, but I think its trouble in GLIB. I have another problem too. When I run my app on another PC that have another build Qt version without GLIB support it doesnt start because QCoreApplication Glib event loop doesn't find in QtCore. But why? I use LD_LIBRARY_PATH and link with my Qt version that support Glib.
Of course, I can distribute my app without my GLIB version, but how I can fix trouble with g_object_init and gstreamer.
I think I have to call g_object_init in main function but I must check GLIB version before.
Maybe someone have the same trouble in the past and tell me how I can fix it or tell me how I can use v4l instead of gstreamer in QtMultimedia.
Sorry for my poor English