本文整理汇总了Python中PyQt5.Qt.QFrame.setFrameShadow方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.setFrameShadow方法的具体用法?Python QFrame.setFrameShadow怎么用?Python QFrame.setFrameShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.Qt.QFrame
的用法示例。
在下文中一共展示了QFrame.setFrameShadow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _initialize_file_type_settings
# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameShadow [as 别名]
def _initialize_file_type_settings(self, layout):
'''Initialize file creation/sending type settings'''
separator_b = QFrame()
separator_b.setFrameStyle(QFrame.HLine)
separator_b.setFrameShadow(QFrame.Sunken)
layout.addWidget(separator_b)
book_types_to_create = QGroupBox()
book_types_to_create.setTitle('Book types to create files for:')
book_types_to_create.setLayout(QHBoxLayout(book_types_to_create))
self._settings['mobi'] = QCheckBox('MOBI')
self._settings['mobi'].setChecked('mobi' in __prefs__['formats'])
book_types_to_create.layout().addWidget(self._settings['mobi'])
self._settings['azw3'] = QCheckBox('AZW3')
self._settings['azw3'].setChecked('azw3' in __prefs__['formats'])
book_types_to_create.layout().addWidget(self._settings['azw3'])
layout.addWidget(book_types_to_create)
file_preference_layout = QGroupBox()
file_preference_layout.setTitle('If device has both (mobi and azw3) formats, prefer:')
file_preference_layout.setLayout(QHBoxLayout(file_preference_layout))
file_preference_group = QButtonGroup()
self._settings['file_preference_mobi'] = QRadioButton('MOBI')
self._settings['file_preference_mobi'].setChecked(__prefs__['file_preference'] == 'mobi')
file_preference_group.addButton(self._settings['file_preference_mobi'])
file_preference_layout.layout().addWidget(self._settings['file_preference_mobi'])
self._settings['file_preference_azw3'] = QRadioButton('AZW3')
self._settings['file_preference_azw3'].setChecked(__prefs__['file_preference'] == 'azw3')
file_preference_group.addButton(self._settings['file_preference_azw3'])
file_preference_layout.layout().addWidget(self._settings['file_preference_azw3'])
layout.addWidget(file_preference_layout)
示例2: _intialize_file_settings
# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameShadow [as 别名]
def _intialize_file_settings(self, layout):
'''Initialize file creation/sending settings'''
separator_a = QFrame()
separator_a.setFrameStyle(QFrame.HLine)
separator_a.setFrameShadow(QFrame.Sunken)
layout.addWidget(separator_a)
files_to_create = QGroupBox()
files_to_create.setTitle('Files to create/send')
files_to_create.setLayout(QGridLayout(files_to_create))
self._settings['create_send_xray'] = QCheckBox('X-Ray')
self._settings['create_send_xray'].setChecked(__prefs__['create_send_xray'])
files_to_create.layout().addWidget(self._settings['create_send_xray'], 0, 0)
self._settings['create_send_author_profile'] = QCheckBox('Author Profile')
self._settings['create_send_author_profile'].setChecked(__prefs__['create_send_author_profile'])
files_to_create.layout().addWidget(self._settings['create_send_author_profile'], 1, 0)
self._settings['create_send_start_actions'] = QCheckBox('Start Actions')
self._settings['create_send_start_actions'].setChecked(__prefs__['create_send_start_actions'])
files_to_create.layout().addWidget(self._settings['create_send_start_actions'], 0, 1)
self._settings['create_send_end_actions'] = QCheckBox('End Actions')
self._settings['create_send_end_actions'].setChecked(__prefs__['create_send_end_actions'])
files_to_create.layout().addWidget(self._settings['create_send_end_actions'], 1, 1)
layout.addWidget(files_to_create)
示例3: FindAnnotationsDialog
# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameShadow [as 别名]
#.........这里部分代码省略.........
self.reset_note_tb.setObjectName('reset_note_tb')
self.reset_note_tb.setToolTip('Clear search criteria')
self.reset_note_tb.setIcon(QIcon(I('trash.png')))
self.reset_note_tb.clicked.connect(self.clear_note_field)
self.scgl.addWidget(self.reset_note_tb, row, 4, 1, 1)
row += 1
# ~~~~~~~~ Create the Date range controls ~~~~~~~~
self.date_range_label = QLabel('Date range')
self.date_range_label.setAlignment(Qt.AlignRight|Qt.AlignVCenter)
self.scgl.addWidget(self.date_range_label, row, 0, 1, 1)
# Date 'From'
self.find_annotations_date_from_dateEdit = MyDateEdit(self, datetime(1970,1,1))
self.find_annotations_date_from_dateEdit.setObjectName('find_annotations_date_from_dateEdit')
#self.find_annotations_date_from_dateEdit.current_val = datetime(1970,1,1)
self.find_annotations_date_from_dateEdit.clear_button.clicked.connect(self.find_annotations_date_from_dateEdit.reset_from_date)
self.scgl.addWidget(self.find_annotations_date_from_dateEdit, row, 1, 1, 1)
self.scgl.addWidget(self.find_annotations_date_from_dateEdit.clear_button, row, 2, 1, 1)
# Date 'To'
self.find_annotations_date_to_dateEdit = MyDateEdit(self, datetime.today())
self.find_annotations_date_to_dateEdit.setObjectName('find_annotations_date_to_dateEdit')
#self.find_annotations_date_to_dateEdit.current_val = datetime.today()
self.find_annotations_date_to_dateEdit.clear_button.clicked.connect(self.find_annotations_date_to_dateEdit.reset_to_date)
self.scgl.addWidget(self.find_annotations_date_to_dateEdit, row, 3, 1, 1)
self.scgl.addWidget(self.find_annotations_date_to_dateEdit.clear_button, row, 4, 1, 1)
row += 1
# ~~~~~~~~ Create a horizontal line ~~~~~~~~
self.hl = QFrame(self)
self.hl.setGeometry(QRect(0, 0, 1, 3))
self.hl.setFrameShape(QFrame.HLine)
self.hl.setFrameShadow(QFrame.Raised)
self.scgl.addWidget(self.hl, row, 0, 1, 5)
row += 1
# ~~~~~~~~ Create the results label field ~~~~~~~~
self.result_label = QLabel('<p style="color:red">scanning…</p>')
self.result_label.setAlignment(Qt.AlignCenter)
self.result_label.setWordWrap(False)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.result_label.sizePolicy().hasHeightForWidth())
self.result_label.setSizePolicy(sizePolicy)
self.result_label.setMinimumSize(QtCore.QSize(250, 0))
self.scgl.addWidget(self.result_label, row, 0, 1, 5)
row += 1
# ~~~~~~~~ Create the ButtonBox ~~~~~~~~
self.dialogButtonBox = QDialogButtonBox(self)
self.dialogButtonBox.setOrientation(Qt.Horizontal)
if False:
self.update_button = QPushButton('Update results')
self.update_button.setDefault(True)
self.update_button.setVisible(False)
self.dialogButtonBox.addButton(self.update_button, QDialogButtonBox.ActionRole)
self.cancel_button = self.dialogButtonBox.addButton(self.dialogButtonBox.Cancel)
self.find_button = self.dialogButtonBox.addButton(self.dialogButtonBox.Ok)
self.find_button.setText('Find Matching Books')
self.l.addWidget(self.dialogButtonBox)
self.dialogButtonBox.clicked.connect(self.find_annotations_dialog_clicked)