def __init__(self, the_text, help_dict = None, help_instance = None): QHBoxLayout.__init__(self) # new_layout = QHBoxLayout() self.cb = QCheckBox(the_text) self.cb.setFont(QFont('SansSerif', 12)) self.addWidget(self.cb) if help_dict != None: if the_text in help_dict.keys(): if (help_instance == None): print "No help instance specified." else: help_button_widget = help_instance.create_button(the_text, help_dict[the_text]) self.addWidget(help_button_widget)
def __init__(self, the_text, help_dict = None, help_instance = None): QHBoxLayout.__init__(self) cb = QLineEdit("") cb.setMinimumWidth(50) cb.setMinimumWidth(200) self.addWidget(cb) if help_dict != None: if the_text in help_dict.keys(): if (help_instance == None): print "No help instance specified." else: help_button_widget = help_instance.create_button(the_text, help_dict[the_text]) self.addWidget(help_button_widget) cb.setFont(QFont('SansSerif', 12)) self.cb = cb