diff --git a/ankiqt/config.py b/ankiqt/config.py index 2b3e6d26e..90f667a32 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -75,6 +75,7 @@ class Config(dict): 'showStudyOptions': False, 'showStudyStats': True, 'showCardTimer': True, + 'standaloneWindows': True, 'extraNewCards': 5, 'randomizeOnCram': True, 'created': time.time(), diff --git a/ankiqt/ui/addcards.py b/ankiqt/ui/addcards.py index 31f98e13c..40497f545 100644 --- a/ankiqt/ui/addcards.py +++ b/ankiqt/ui/addcards.py @@ -22,7 +22,11 @@ class FocusButton(QPushButton): class AddCards(QDialog): def __init__(self, parent): - QDialog.__init__(self, parent, Qt.Window) + if parent.config['standaloneWindows']: + windParent = None + else: + windParent = parent + QDialog.__init__(self, windParent, Qt.Window) self.parent = parent self.config = parent.config self.dialog = ankiqt.forms.addcards.Ui_AddCards() diff --git a/ankiqt/ui/cardlist.py b/ankiqt/ui/cardlist.py index 31327983a..e458b7205 100644 --- a/ankiqt/ui/cardlist.py +++ b/ankiqt/ui/cardlist.py @@ -278,6 +278,10 @@ class StatusDelegate(QItemDelegate): class EditDeck(QMainWindow): def __init__(self, parent): + if parent.config['standaloneWindows']: + windParent = None + else: + windParent = parent QMainWindow.__init__(self, parent) self.parent = parent self.deck = self.parent.deck