Re: An issue with Qt styling and/or threads?
- From: Bernhard Schuster <schuster bernhard googlemail com>
- To: James Tappin <jtappin gmail com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: An issue with Qt styling and/or threads?
- Date: Sat, 18 Feb 2012 14:39:36 +0100
What as in a Qt 4.x to 4.y version change that Qt Pixmaps could only
be used in the UI thread, and no other thread. This can be considered
a bug. If you wrote the code I suggest you to use QImage which can be
used anywhere and convert it on the fly to QPixmap, right where you
need it to render (not a perfect solution, but the only I know of
right now).
Regards
Bernhard Schuster
2012/2/17 James Tappin <jtappin gmail com>:
I have a problem running a Gtk program when using the "Qt" style as
supplied via gtk-qt-engine and kde-config-gtk-style.
The program is a fairly heavy duty computation that uses openmp for
parallel computation and has a gtk progress monitor (which is updated
from within a "critical" section so it can never be accessed by more
than one thread at a time). When the "Qt" style is selected, the
progress bars (gtk_progress_bar) are corrupted and the errors below
are displayed repeatedly:
(th_run:2015): Gdk-CRITICAL **: gdk_pixmap_foreign_new_for_display:
assertion `(anid != 0)' failed
(th_run:2015): Gdk-CRITICAL **: gdk_draw_drawable: assertion
`GDK_IS_DRAWABLE (src)' failed
(th_run:2015): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Paint device returned engine == 0, type: 2
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::end: Painter not active, aborted
The problem does not occur with other Gtk style settings (e.g. Nuvola).
I'm not sure if the problem is with the Qt wrapper, Gtk+ or my code.
FWIW I'm running Debian stable, with Gtk+ 2.20.
Any ideas?
James
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]