From 7061c2c1187565f8bcebee01e84074f9bb339515 Mon Sep 17 00:00:00 2001 From: ospalh Date: Mon, 26 Nov 2012 13:47:45 +0100 Subject: [PATCH] Work around Qt bug 1894 (detached list pop-up) --- aqt/clayout.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aqt/clayout.py b/aqt/clayout.py index 90237567c..545af89ff 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -382,7 +382,14 @@ Enter deck to place new %s cards in, or leave blank:""") % form.font.setCurrentFont(QFont("Arial")) form.size.setValue(20) diag.show() - form.fields.showPopup() + # Work around a Qt bug, + # https://bugreports.qt-project.org/browse/QTBUG-1894 + if isMac or isWin: + # No problems on Macs or Windows. + form.fields.showPopup() + else: + # Delay showing the pop-up. + self.mw.progress.timer(200, form.fields.showPopup, False) if not diag.exec_(): return if form.radioQ.isChecked():