当前位置: 首页>>代码示例>>Python>>正文


Python QFrame.Sunken方法代码示例

本文整理汇总了Python中PyQt5.QtWidgets.QFrame.Sunken方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.Sunken方法的具体用法?Python QFrame.Sunken怎么用?Python QFrame.Sunken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtWidgets.QFrame的用法示例。


在下文中一共展示了QFrame.Sunken方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_add_base

# 需要导入模块: from PyQt5.QtWidgets import QFrame [as 别名]
# 或者: from PyQt5.QtWidgets.QFrame import Sunken [as 别名]
def test_add_base(self):
        key = debug.qenum_key(QFrame, QFrame.Sunken, add_base=True)
        assert key == 'QFrame.Sunken' 
开发者ID:qutebrowser,项目名称:qutebrowser,代码行数:5,代码来源:test_debug.py

示例2: initOtherButtons

# 需要导入模块: from PyQt5.QtWidgets import QFrame [as 别名]
# 或者: from PyQt5.QtWidgets.QFrame import Sunken [as 别名]
def initOtherButtons(self, flags):
        # other action buttons
        if len(self.button_list) != 0:
            self.separator1 = QFrame(self)
            self.separator1.setFrameShape(QFrame.VLine)
            self.separator1.setFrameShadow(QFrame.Sunken)
            self.hlayout.addWidget(self.separator1)

            self.undoButton = QPushButton(self)
            self.undoButton.setIcon(QIcon(":/resource/icon/undo.png"))
            self.undoButton.setFixedSize(self.iconWidth, self.iconWidth)
            self.undoButton.clicked.connect(self.otherButtonsClicked)
            self.hlayout.addWidget(self.undoButton)

        if flags & constant.SAVE_TO_FILE:
            self.saveButton = QPushButton(self)
            self.saveButton.setIcon(QIcon(":/resource/icon/save.png"))
            self.saveButton.setFixedSize(self.iconWidth, self.iconHeight)
            self.saveButton.clicked.connect(self.otherButtonsClicked)
            self.hlayout.addWidget(self.saveButton)

        self.separator2 = QFrame(self)
        self.separator2.setFrameShape(QFrame.VLine)
        self.separator2.setFrameShadow(QFrame.Sunken)
        self.hlayout.addWidget(self.separator2)

        self.cancelButton = QPushButton(self)
        self.cancelButton.setIcon(QIcon(":/resource/icon/close.png"))
        self.cancelButton.setFixedSize(self.iconWidth, self.iconHeight)
        self.cancelButton.clicked.connect(self.otherButtonsClicked)

        if flags & constant.CLIPBOARD:
            self.okButton = QPushButton(self)
            self.okButton.setIcon(QIcon(":/resource/icon/check.png"))
            self.okButton.setFixedSize(self.iconWidth, self.iconHeight)
            self.okButton.clicked.connect(self.otherButtonsClicked)
            self.hlayout.addWidget(self.okButton)

        self.hlayout.addWidget(self.cancelButton) 
开发者ID:SeptemberHX,项目名称:screenshot,代码行数:41,代码来源:toolbar.py

示例3: __init__

# 需要导入模块: from PyQt5.QtWidgets import QFrame [as 别名]
# 或者: from PyQt5.QtWidgets.QFrame import Sunken [as 别名]
def __init__(self, orientation='horizontal', parent=None):
        super().__init__(parent)

        self._app = parent

        if orientation == 'horizontal':
            self.setFrameShape(QFrame.HLine)
        else:
            self.setFrameShape(QFrame.VLine)

        if self._app.theme_mgr.theme == 'dark':
            self.setStyleSheet(stylesheet.format('#232323'))
            self.setMaximumHeight(1)
        else:
            self.setFrameShadow(QFrame.Sunken) 
开发者ID:feeluown,项目名称:FeelUOwn,代码行数:17,代码来源:separator.py

示例4: __init__

# 需要导入模块: from PyQt5.QtWidgets import QFrame [as 别名]
# 或者: from PyQt5.QtWidgets.QFrame import Sunken [as 别名]
def __init__(self, parent=None):
        super(SeparatorWidget, self).__init__(parent)
        self.setFrameShape(QFrame.HLine)
        self.setFrameShadow(QFrame.Sunken)
        self.setStyleSheet('''
            QFrame{
                background-color: black;
            }
        ''') 
开发者ID:haruiz,项目名称:CvStudio,代码行数:11,代码来源:image_viewer_toolbox.py

示例5: __init__

# 需要导入模块: from PyQt5.QtWidgets import QFrame [as 别名]
# 或者: from PyQt5.QtWidgets.QFrame import Sunken [as 别名]
def __init__(self, parent=None):
        super().__init__(parent)

        self.filepath = ''

        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowTitle(translate('LayoutSelect', 'Layout selection'))
        self.setMaximumSize(675, 300)
        self.setMinimumSize(675, 300)
        self.resize(675, 300)

        self.setLayout(QGridLayout(self))
        self.layout().setContentsMargins(5, 5, 5, 5)

        self.layoutCombo = QComboBox(self)
        self.layoutCombo.currentIndexChanged.connect(self.show_description)
        self.layout().addWidget(self.layoutCombo, 0, 0)

        self.confirmButton = QPushButton(self)
        self.confirmButton.setText(translate('LayoutSelect', 'Select layout'))
        self.layout().addWidget(self.confirmButton, 0, 1)

        self.fileButton = QPushButton(self)
        self.fileButton.setText(translate('LayoutSelect', 'Open file'))
        self.layout().addWidget(self.fileButton, 0, 2)

        self.layout().setColumnStretch(0, 3)
        self.layout().setColumnStretch(1, 2)
        self.layout().setColumnStretch(2, 1)

        line = QFrame(self)
        line.setFrameShape(QFrame.HLine)
        line.setFrameShadow(QFrame.Sunken)
        self.layout().addWidget(line, 1, 0, 1, 3)

        self.description = QTextBrowser(self)
        self.layout().addWidget(self.description, 2, 0, 1, 3)

        for layout_class in layouts.get_layouts():
            self.layoutCombo.addItem(layout_class.NAME, layout_class)

        if self.layoutCombo.count() == 0:
            raise Exception('No layout installed!')

        self.confirmButton.clicked.connect(self.accept)
        self.fileButton.clicked.connect(self.open_file) 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:48,代码来源:layoutselect.py


注:本文中的PyQt5.QtWidgets.QFrame.Sunken方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。