From 430a61eb429a501d839c8135a0e22db8b7dfe09d Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 12 Jul 2022 16:50:49 +0200 Subject: [PATCH] qt QRDialog: try to fix layout-sizing issues related https://github.com/spesmilo/electrum/pull/7218 closes https://github.com/spesmilo/electrum/pull/7223 --- electrum/gui/qt/qrcodewidget.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py index 472a3349d..d012c8c8d 100644 --- a/electrum/gui/qt/qrcodewidget.py +++ b/electrum/gui/qt/qrcodewidget.py @@ -116,7 +116,6 @@ class QRDialog(WindowModalDialog): help_text = data if show_text else help_text if help_text: - qr_hbox.setContentsMargins(0, 0, 0, 44) text_label = WWLabel() text_label.setText(help_text) vbox.addWidget(text_label) @@ -165,3 +164,8 @@ class QRDialog(WindowModalDialog): vbox.addLayout(hbox) self.setLayout(vbox) + + # note: the word-wrap on the text_label is causing layout sizing issues. + # see https://stackoverflow.com/a/25661985 and https://bugreports.qt.io/browse/QTBUG-37673 + # workaround: + self.setMinimumSize(self.sizeHint())