예제 #1
0
 def __init__(self, *args):
     self.__data = None
     parent = None
     margin = 0
     spacing = -1
     if len(args) in (2, 3):
         parent, margin = args[:2]
         if len(args) == 3:
             spacing = args[-1]
     elif len(args) == 1:
         if isinstance(args[0], int):
             (spacing, ) = args
         else:
             (parent, ) = args
     elif len(args) != 0:
         raise TypeError("%s() takes 0, 1, 2 or 3 argument(s) (%s given)" %
                         (self.__class__.__name__, len(args)))
     QLayout.__init__(self, parent)
     self.__data = QwtDynGridLayout_PrivateData()
     self.setSpacing(spacing)
     self.setContentsMargins(margin, margin, margin, margin)
예제 #2
0
 def __init__(self, parent=None, margin=-1, h_spacing=-1, v_spacing=-1):
     QLayout.__init__(self, parent)
     self.setContentsMargins(margin, margin, margin, margin)
     self.m_h_space = h_spacing
     self.m_v_space = v_spacing
     self.item_list = []
예제 #3
0
 def __init__(self, parent=None, margin=-1, h_spacing=-1, v_spacing=-1):
     QLayout.__init__(self, parent)
     self.setContentsMargins(margin, margin, margin, margin)
     self.m_h_space = h_spacing
     self.m_v_space = v_spacing
     self.item_list = []