本文整理汇总了Python中PyQt4.Qt.QGridLayout.addLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QGridLayout.addLayout方法的具体用法?Python QGridLayout.addLayout怎么用?Python QGridLayout.addLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QGridLayout
的用法示例。
在下文中一共展示了QGridLayout.addLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConfigWidget
# 需要导入模块: from PyQt4.Qt import QGridLayout [as 别名]
# 或者: from PyQt4.Qt.QGridLayout import addLayout [as 别名]
class ConfigWidget(QWidget, Logger):
'''
Config dialog for Marvin Manager
'''
WIZARD_PROFILES = {
'Annotations': {
'label': 'mm_annotations',
'datatype': 'comments',
'display': {},
'is_multiple': False
},
'Collections': {
'label': 'mm_collections',
'datatype': 'text',
'display': {u'is_names': False},
'is_multiple': True
},
'Last read': {
'label': 'mm_date_read',
'datatype': 'datetime',
'display': {},
'is_multiple': False
},
'Locked': {
'label': 'mm_locked',
'datatype': 'bool',
'display': {},
'is_multiple': False
},
'Progress': {
'label': 'mm_progress',
'datatype': 'float',
'display': {u'number_format': u'{0:.0f}%'},
'is_multiple': False
},
'Read': {
'label': 'mm_read',
'datatype': 'bool',
'display': {},
'is_multiple': False
},
'Reading list': {
'label': 'mm_reading_list',
'datatype': 'bool',
'display': {},
'is_multiple': False
},
'Word count': {
'label': 'mm_word_count',
'datatype': 'int',
'display': {u'number_format': u'{0:n}'},
'is_multiple': False
}
}
def __init__(self, plugin_action):
QWidget.__init__(self)
self.parent = plugin_action
self.gui = get_gui()
self.icon = plugin_action.icon
self.opts = plugin_action.opts
self.prefs = plugin_prefs
self.resources_path = plugin_action.resources_path
self.verbose = plugin_action.verbose
self.restart_required = False
self._log_location()
self.l = QGridLayout()
self.setLayout(self.l)
self.column1_layout = QVBoxLayout()
self.l.addLayout(self.column1_layout, 0, 0)
self.column2_layout = QVBoxLayout()
self.l.addLayout(self.column2_layout, 0, 1)
# ----------------------------- Column 1 -----------------------------
# ~~~~~~~~ Create the Custom fields options group box ~~~~~~~~
self.cfg_custom_fields_gb = QGroupBox(self)
self.cfg_custom_fields_gb.setTitle('Custom column assignments')
self.column1_layout.addWidget(self.cfg_custom_fields_gb)
self.cfg_custom_fields_qgl = QGridLayout(self.cfg_custom_fields_gb)
current_row = 0
# ++++++++ Labels + HLine ++++++++
self.marvin_source_label = QLabel("Marvin source")
self.cfg_custom_fields_qgl.addWidget(self.marvin_source_label, current_row, 0)
self.calibre_destination_label = QLabel("calibre destination")
self.cfg_custom_fields_qgl.addWidget(self.calibre_destination_label, current_row, 1)
current_row += 1
self.sd_hl = QFrame(self.cfg_custom_fields_gb)
self.sd_hl.setFrameShape(QFrame.HLine)
self.sd_hl.setFrameShadow(QFrame.Raised)
self.cfg_custom_fields_qgl.addWidget(self.sd_hl, current_row, 0, 1, 3)
current_row += 1
# ++++++++ Annotations ++++++++
#.........这里部分代码省略.........