本文整理汇总了Python中PySide.QtGui.QFrame.setFrameShadow方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.setFrameShadow方法的具体用法?Python QFrame.setFrameShadow怎么用?Python QFrame.setFrameShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QFrame
的用法示例。
在下文中一共展示了QFrame.setFrameShadow方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BorderBox
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def BorderBox(self, layout):
from PySide.QtGui import QFrame
toto = QFrame()
toto.setLayout(layout)
toto.setFrameShape(QFrame.Box)
toto.setFrameShadow(QFrame.Sunken)
return toto
示例2: HorizontalDivider
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def HorizontalDivider():
"""
Creates a horizontal divider line.
:return:
"""
divider = QFrame()
divider.setFrameShape(QFrame.HLine)
divider.setFrameShadow(QFrame.Raised)
return divider
示例3: VerticalDivider
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def VerticalDivider():
"""
Creates a vertical divider line.
:return:
"""
divider = QFrame()
divider.setFrameShape(QFrame.VLine)
divider.setFrameShadow(QFrame.Raised)
return divider
示例4: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def __init__(self):
generic.GenericGui.__init__(self)
window = QWidget()
window.setWindowTitle('quichem-pyside')
self.compiler_view = QListWidget()
self.compiler_view.currentRowChanged.connect(self.show_source)
self.stacked_widget = QStackedWidget()
self.stacked_widget.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
self.edit = QLineEdit()
self.edit.setPlaceholderText('Type quichem input...')
self.edit.textChanged.connect(self.change_value)
self.view = QWebView()
self.view.page().mainFrame().setScrollBarPolicy(Qt.Vertical,
Qt.ScrollBarAlwaysOff)
self.view.page().action(QWebPage.Reload).setVisible(False)
self.view.setMaximumHeight(0)
self.view.setUrl('qrc:/web/page.html')
self.view.setZoomFactor(2)
self.view.page().mainFrame().contentsSizeChanged.connect(
self._resize_view)
# For debugging JS:
## from PySide.QtWebKit import QWebSettings
## QWebSettings.globalSettings().setAttribute(
## QWebSettings.DeveloperExtrasEnabled, True)
button_image = QPushButton('Copy as Image')
button_image.clicked.connect(self.set_clipboard_image)
button_image.setToolTip('Then paste into any graphics program')
button_word = QPushButton('Copy as MS Word Equation')
button_word.clicked.connect(self.set_clipboard_word)
button_html = QPushButton('Copy as Formatted Text')
button_html.clicked.connect(self.set_clipboard_html)
line = QFrame()
line.setFrameShape(QFrame.HLine)
line.setFrameShadow(QFrame.Sunken)
button_layout = QHBoxLayout()
button_layout.addStretch()
button_layout.addWidget(button_image)
button_layout.addWidget(button_word)
button_layout.addWidget(button_html)
source_layout = QHBoxLayout()
source_layout.addWidget(self.compiler_view)
source_layout.addWidget(self.stacked_widget, 1)
QVBoxLayout(window)
window.layout().addWidget(self.edit)
window.layout().addWidget(self.view)
window.layout().addLayout(button_layout)
window.layout().addWidget(line)
window.layout().addLayout(source_layout, 1)
window.show()
window.resize(window.minimumWidth(), window.height())
# To prevent garbage collection of internal Qt object.
self._window = window
示例5: create_separator
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def create_separator(self, parent, is_vertical=True):
""" Returns an adapted separator line control.
"""
control = QFrame()
control.setFrameShadow(QFrame.Sunken)
if is_vertical:
control.setFrameShape(QFrame.VLine)
control.setMinimumWidth(5)
else:
control.setFrameShape(QFrame.HLine)
control.setMinimumHeight(5)
return control_adapter_for(control)
示例6: add_separator
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def add_separator ( self, parent ):
""" Adds a separator to the layout.
"""
control = QFrame()
control.setFrameShadow( QFrame.Sunken )
if self.is_vertical or (self.columns > 0):
control.setFrameShape( QFrame.HLine )
control.setMinimumHeight( 5 )
else:
control.setFrameShape( QFrame.VLine )
control.setMinimumWidth( 5 )
if self.columns > 0:
self.layout.addWidget( control, self._row, 0, 1, self.columns )
self._row += 1
else:
self.layout.addWidget( control )
示例7: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def __init__(self, options, parent=None):
_OptionsWizardPage.__init__(self, options, parent=parent)
self.setTitle("Conversion warnings")
# Widgets
self._lbl_count = SimulationCountLabel()
self._lbl_count.setAlignment(Qt.AlignCenter)
# Layouts
layout = self.layout()
frm_line = QFrame()
frm_line.setFrameStyle(QFrame.HLine)
frm_line.setFrameShadow(QFrame.Sunken)
layout.addWidget(frm_line)
sublayout = QHBoxLayout()
sublayout.setContentsMargins(10, 0, 10, 0)
sublayout.addWidget(self._lbl_count)
layout.addLayout(sublayout)
示例8: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def __init__(self, options, parent=None):
_OptionsWizardPage.__init__(self, options, parent)
# Widgets
self._lbl_count = SimulationCountLabel()
self._lbl_count.setAlignment(Qt.AlignCenter)
self._lbl_count.setValue(1)
# Layouts
layout = self.layout()
frm_line = QFrame()
frm_line.setFrameStyle(QFrame.HLine)
frm_line.setFrameShadow(QFrame.Sunken)
layout.addWidget(frm_line)
sublayout = QHBoxLayout()
sublayout.setContentsMargins(10, 0, 10, 0)
sublayout.addWidget(self._lbl_count)
layout.addLayout(sublayout)
# Signals
self.valueChanged.connect(self._onChanged)
示例9: View
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
class View(QWidget):
"""Base `View` class. Defines behavior common in all views"""
# Selecting a good font family for each platform
osname = platform.system()
if osname == 'Windows':
fontFamily = 'Segoe UI'
elif osname == 'Linux':
fontFamily = ''
else:
fontFamily = ''
def __init__(self, parent=None):
"""
Init method. Initializes parent classes
:param parent: Reference to a `QWidget` object to be used as parent
"""
super(View, self).__init__(parent)
@staticmethod
def labelsFont():
"""Returns the `QFont` that `QLabels` should use"""
return View.font(True)
@staticmethod
def editsFont():
"""Returns the `QFont` that `QLineEdits` should use"""
return View.font(False)
@staticmethod
def font(bold):
"""
Returns a `QFont` object to be used in `View` derived classes.
:param bold: Indicates whether or not the font will be bold
"""
font = QFont(View.fontFamily, 9, 50, False)
font.setBold(bold)
return font
def setLogo(self):
"""Sets the company logo in the same place in all views"""
logoPixmap = QPixmap(':/resources/logo.png')
self.iconLabel = QLabel(self)
self.iconLabel.setPixmap(logoPixmap)
self.iconLabel.setGeometry(20, 20, logoPixmap.width(), logoPixmap.height())
self.linkLabel = QLabel(self)
self.linkLabel.setText(
"""<font size="1"><a href="http://www.iqstorage.com/fromiqbox.php">
Developed at IQ Storage FTP Hosing Services</a></font>""")
self.linkLabel.setOpenExternalLinks(True)
# Defines a visual line separator to be placed under the `logoPixmap` `QLabel`
self.line = QFrame()
self.line.setFrameShape(QFrame.HLine);
self.line.setFrameShadow(QFrame.Sunken);
示例10: HLine
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 别名]
def HLine(self):
from PySide.QtGui import QFrame
toto = QFrame()
toto.setFrameShape(QFrame.HLine)
toto.setFrameShadow(QFrame.Sunken)
return toto