<div dir="ltr">Don't create/exec QApplication when you're using qt-repl,<div>it's already created for you.<br><div>Put that into separate function and only call it in "production"</div><div>setting, i.e. when you're not using REPL.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 4, 2016 at 3:43 PM, Orm Finnendahl <span dir="ltr"><<a href="mailto:orm.finnendahl@selma.hfmdk-frankfurt.de" target="_blank">orm.finnendahl@selma.hfmdk-frankfurt.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I still have problems with qt-repl and qt:<br>
<br>
As expected, running the following code in qt works fine, but the repl<br>
is blocked until the window is closed:<br>
<br>
(ql:quickload "qt")<br>
(in-package :qt)<br>
<br>
(let* ((app (make-qapplication)))<br>
(with-objects ((window (#_new QWidget)))<br>
(#_setGeometry window 0 0 300 200)<br>
(#_setWindowTitle window "TestWindow")<br>
(#_show window)<br>
(#_exec app)))<br>
<br>
Trying the same code in the qt-repl doesn't show the window:<br>
<br>
(ql:quickload "qt-repl")<br>
(in-package :qt-repl)<br>
(start-gui-thread)<br>
<br>
(let* ((app (make-qapplication)))<br>
(with-objects ((window (#_new QWidget)))<br>
(#_setGeometry window 0 0 300 200)<br>
(#_setWindowTitle window "TestWindow")<br>
(#_show window)<br>
(#_exec app)))<br>
<br>
----<br>
On the other hand, opening a window using an external ui file works<br>
fine from the qt-repl:<br>
<br>
(ql:quickload "qt-repl")<br>
(in-package :qt-repl)<br>
(start-gui-thread)<br>
(ensure-smoke :qtuitools)<br>
<br>
(let* ((app (make-qapplication))<br>
(pathname "/home/orm/work/programmieren/lisp/ui-design/mainwindow.ui")<br>
(ui-loader (#_new QUiLoader))<br>
(ui-file (#_new QFile pathname))<br>
(toplevel (#_load ui-loader<br>
(progn<br>
(#_open ui-file (#_QFile::ReadOnly))<br>
ui-file))))<br>
(#_close ui-file)<br>
(#_delete ui-loader)<br>
(#_show toplevel)<br>
(#_exec app))<br>
<br>
<br>
Does anybody know what I'm missing?<br>
<br>
--<br>
Orm<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Ivan Shvedunov <<a href="mailto:ivan4th@gmail.com" target="_blank">ivan4th@gmail.com</a>><br>;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9 F7D0 613E C0F8 0BC5 2807</div>
</div>