URI: 
       tfixedSize qrcode widget - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit e5b44bacda6da6c69538ae2efd04ba6eb0f3b2b3
   DIR parent 3fa113d76b989325da33bddfb013236146abf284
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Tue, 17 Jun 2014 14:58:12 +0200
       
       fixedSize qrcode widget
       
       Diffstat:
         M gui/qt/main_window.py               |       2 +-
         M gui/qt/qrcodewidget.py              |      10 +++++++---
       
       2 files changed, 8 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -687,7 +687,7 @@ class ElectrumWindow(QMainWindow):
                grid.addWidget(clear_button, 3, 2)
                grid.setRowStretch(4, 1)
        
       -        self.receive_qr = QRCodeWidget()
       +        self.receive_qr = QRCodeWidget(fixedSize=200)
                grid.addWidget(self.receive_qr, 0, 4, 5, 2)
        
                grid.setRowStretch(5, 1)
   DIR diff --git a/gui/qt/qrcodewidget.py b/gui/qt/qrcodewidget.py
       t@@ -13,10 +13,13 @@ from electrum.i18n import _
        
        class QRCodeWidget(QWidget):
        
       -    def __init__(self, data = None):
       +    def __init__(self, data = None, fixedSize=False):
                QWidget.__init__(self)
                self.data = None
                self.qr = None
       +        self.fixedSize=fixedSize
       +        if fixedSize:
       +            self.setFixedSize(fixedSize, fixedSize)
                self.setData(data)
        
        
       t@@ -26,8 +29,9 @@ class QRCodeWidget(QWidget):
                if self.data:
                    self.qr = qrcode.QRCode()
                    self.qr.add_data(self.data)
       -            k = len(self.qr.get_matrix())
       -            self.setMinimumSize(k*5,k*5)
       +            if not self.fixedSize:
       +                k = len(self.qr.get_matrix())
       +                self.setMinimumSize(k*5,k*5)
                else:
                    self.qr = None