[Commonqt-devel] Qt Tutorial: Memory Fault: Partially fixed.
Frank Goenninger
frgo at me.com
Sat Apr 26 19:00:20 UTC 2014
Am 26.04.14 18:25 schrieb "Stas Boukarev" unter <stassats at gmail.com>:
>Ivan Shvedunov <ivan4th at gmail.com> writes:
>
>> Unfortunately it seems to be a problem with Mac OS X,
>> see comments for https://bugreports.qt-project.org/browse/QTBUG-7393
>> Seems like the only fix is to run QApplication from the main
>> thread which doesn't seem to be possible with threaded SBCL.
>> Not sure whether there are other workarounds :(
>It is possible with threaded SBCL, the initial REPL thread is the main
>thread.
So ...
After having spent the better part of this day getting CommonQt to tun on
OS X there's a couple of points to note:
Do not follow any other info than that on CommonQt's Homepage. It will
cause you trouble, especially if you are on OS X. ;-)
The other point is related to the thread challenge I encountered. And yes,
multi-threaded SBCL is able to run CommonQt on OS X if
1. You change file repl-integration.lisp line 106 from "initial thread" to
"main thread" and recompile and reload the qt package.
2. You don't use Slime to interact with your REPL.
The second is a real PITA. So I tried digging up a solution. The qt-repp
package seemed the right thing to use. Nope:
(ql:quickload :qt-repl)
(qt-repl:start-gui-thread)
Lisp output:
WARNING: QApplication was not created in the main() thread.
Using qt-repl:eval-in-gui-thread (with the mods described above) then
tries to execute the evaluation in the guy thread. But no, this doesn't
work:
Lisp output:
QCoreApplication::exec: The event loop is already running
Slime repl output:
CL-USER> (qt-repl:eval-in-gui-thread (qt-conv:main))
-1
and that's where I am stuck now. Further digging or suggestions are in
order ;-)
Thanks to Stas and Ivan for the support so far!
Regards
Frank
More information about the commonqt-devel
mailing list