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


Python QtGui.QFrame方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def __init__(self, *args):
        QtWidgets.QFrame.__init__(self, *args)
 
        self.setFrameStyle(QtWidgets.QFrame.StyledPanel | QtWidgets.QFrame.Sunken)
 
        self.edit = self.PlainTextEdit()
        self.number_bar = self.NumberBar(self.edit)
 
        hbox = QtWidgets.QHBoxLayout(self)
        hbox.setSpacing(0)
        hbox.setContentsMargins(0,0,0,0) # setMargin
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)
 
        self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
        self.edit.updateRequest.connect(self.number_bar.updateContents) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:18,代码来源:LNTextEdit.py

示例2: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def __init__(self, *args):
        QtGui.QFrame.__init__(self, *args)
 
        self.setFrameStyle(QtGui.QFrame.StyledPanel | QtGui.QFrame.Sunken)
 
        self.edit = self.PlainTextEdit()
        self.number_bar = self.NumberBar(self.edit)
 
        hbox = QtGui.QHBoxLayout(self)
        hbox.setSpacing(0)
        hbox.setContentsMargins(0,0,0,0) # setMargin
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)
 
        self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
        self.edit.updateRequest.connect(self.number_bar.updateContents) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:18,代码来源:LNTextEdit_v3.2.py

示例3: _separator

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def _separator(self):

        sep = QtGui.QFrame()
        sep.setFrameStyle(QtGui.QFrame.HLine | QtGui.QFrame.Plain)

        return sep

    # ------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:10,代码来源:base.py

示例4: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def __init__(self, *args, **kwargs):
            QtGui.QFrame.__init__(self)
            Custom.__init__(self, *args, **kwargs)
            self.setFrameStyle(QtGui.QFrame.Box | QtGui.QFrame.Plain) 
开发者ID:mwisslead,项目名称:vfp2py,代码行数:6,代码来源:vfpfunc.py

示例5: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def __init__(self):
            super(Gui, self).__init__()
            self.resize(250, 300)

            self._list = QtGui.QListWidget(self)

            self._button1 = QtGui.QPushButton("Test CallbackEvent", self)     
            self._button2 = QtGui.QPushButton("Test CallbackPool", self)     
            
            layout = QtGui.QVBoxLayout(self)
            layout.setSpacing(2)
            layout.addWidget(self._button1)

            line = QtGui.QFrame(self)
            line.setFrameStyle(line.HLine)
            layout.addSpacing(6)
            layout.addWidget(line)
            layout.addSpacing(6)

            layout.addWidget(self._list)
            layout.addWidget(self._button2)

            self._pool = CallbackThreadPool(4)

            self._button1.clicked.connect(self.runCallbackEvents)
            self._button2.clicked.connect(self.runCallbackPool) 
开发者ID:ActiveState,项目名称:code,代码行数:28,代码来源:recipe-578634.py

示例6: setReadOnlyStyle

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def setReadOnlyStyle(self, state):
        if state == 1:
            mainWindowBgColor = QtGui.QPalette().color(QtGui.QPalette.Window)
            self.setStyleSheet('QPlainTextEdit[readOnly="true"] { background-color: %s;} QFrame {border: 0px}' % mainWindowBgColor.name() )
            self.setHighlight(0)
        else:
            self.setStyleSheet('')
            self.setHighlight(1) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:10,代码来源:LNTextEdit.py

示例7: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def __init__(self):
        # type: () -> None
        super(HLine, self).__init__()
        self.setFrameShape(QtGui.QFrame.HLine)
        self.setFrameShadow(QtGui.QFrame.Sunken) 
开发者ID:wehr-lab,项目名称:autopilot,代码行数:7,代码来源:plots.py

示例8: init_tree_widget

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def init_tree_widget(self):
        #Preview button
        v_box = QtGui.QVBoxLayout(self.tree_widget)
        preview_button = QtGui.QPushButton('Preview', self.tree_widget)
        preview_button.clicked.connect(self.preview)
        #self.fast_preview = QtGui.QCheckBox("Fast preview", self.tree_widget)
        line = QtGui.QFrame(self.tree_widget)
        line.setFrameShape(QtGui.QFrame.HLine);
        line.setFrameShadow(QtGui.QFrame.Sunken);
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        h_box.addWidget(preview_button)
        #h_box.addWidget(self.fast_preview)
        v_box.addLayout(h_box)
        v_box.addWidget(line)
        self.tree_vbox.addLayout(v_box)
        # Add part buttons
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        add_parts_button = QtGui.QPushButton('Add parts', self.tree_widget)
        add_parts_button.clicked.connect(self.add_parts)
        add_same_part_button = QtGui.QPushButton('Add same parts', self.tree_widget)
        add_same_part_button.clicked.connect(self.add_same_parts)
        h_box.addWidget(add_parts_button)
        h_box.addWidget(add_same_part_button)
        self.tree_vbox.addLayout(h_box)
        # tree
        self.selection_model = self.tree_view_widget.selectionModel()
        self.selection_model.selectionChanged.connect(self.selection_changed)
        self.tree_vbox.addWidget(self.tree_view_widget)
        remove_item_button = QtGui.QPushButton('Remove item', self.tree_widget)
        remove_item_button.clicked.connect(self.remove_items)
        self.tree_vbox.addWidget(remove_item_button)
        # test layout
        self.edit_items_layout = QtGui.QVBoxLayout(self.tree_widget)
        self.tree_vbox.addLayout(self.edit_items_layout) 
开发者ID:execuc,项目名称:LCInterlocking,代码行数:36,代码来源:crosspiece.py

示例9: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(754, 662)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.dialog_label = QtGui.QLabel(Dialog)
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);\n"
"font: 18pt;")
        self.dialog_label.setObjectName("dialog_label")
        self.verticalLayout.addWidget(self.dialog_label)
        self.line = QtGui.QFrame(Dialog)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.formLayout = QtGui.QFormLayout()
        self.formLayout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.formLayout.setObjectName("formLayout")
        self.name_label = QtGui.QLabel(Dialog)
        self.name_label.setObjectName("name_label")
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.name_label)
        self.name_fields_verticalLayout = QtGui.QVBoxLayout()
        self.name_fields_verticalLayout.setObjectName("name_fields_verticalLayout")
        self.name_validator_label = QtGui.QLabel(Dialog)
        self.name_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.name_validator_label.setObjectName("name_validator_label")
        self.name_fields_verticalLayout.addWidget(self.name_validator_label)
        self.formLayout.setLayout(0, QtGui.QFormLayout.FieldRole, self.name_fields_verticalLayout)
        self.filenmate_templates_label = QtGui.QLabel(Dialog)
        self.filenmate_templates_label.setObjectName("filenmate_templates_label")
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.filenmate_templates_label)
        self.filename_template_fields_verticalLayout = QtGui.QVBoxLayout()
        self.filename_template_fields_verticalLayout.setObjectName("filename_template_fields_verticalLayout")
        self.formLayout.setLayout(1, QtGui.QFormLayout.FieldRole, self.filename_template_fields_verticalLayout)
        self.custom_template_label = QtGui.QLabel(Dialog)
        self.custom_template_label.setObjectName("custom_template_label")
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.custom_template_label)
        self.custom_template_plainTextEdit = QtGui.QPlainTextEdit(Dialog)
        self.custom_template_plainTextEdit.setObjectName("custom_template_plainTextEdit")
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.custom_template_plainTextEdit)
        self.verticalLayout.addLayout(self.formLayout)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.verticalLayout.setStretch(2, 1)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:eoyilmaz,项目名称:anima,代码行数:54,代码来源:structure_dialog_UI_pyside.py

示例10: PopulateWidget

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def PopulateWidget(self):
        signatures_widget = QtWidgets.QFrame()
        layout = QtWidgets.QVBoxLayout()

        layout.addWidget(QtWidgets.QLabel('Signatures'))
        self.signatures_list = QtWidgets.QListWidget()
        layout.addWidget(self.signatures_list)
        signatures_widget.setLayout(layout)

        container2 = QtWidgets.QGridLayout()
        container2.addWidget(signatures_widget, 0, 0)

        subsignatures_widget = QtWidgets.QFrame()
        layout = QtWidgets.QVBoxLayout()
        self.subsignatures_list = QtWidgets.QListWidget()
        layout.addWidget(QtWidgets.QLabel("LDB subsignatures"))
        layout.addWidget(self.subsignatures_list)
        subsignatures_widget.setLayout(layout)
        container2.addWidget(subsignatures_widget, 0, 1)
        #subsignatures_widget.hide()

        container3 = QtWidgets.QVBoxLayout()
        container3.addLayout(container2)
        self.match_label = QtWidgets.QLabel()
        container3.addWidget(self.match_label)
        self.signature_line_edit = QtWidgets.QLineEdit()
        container3.addWidget(self.signature_line_edit)
        container4 = QtWidgets.QHBoxLayout()
        container3.addLayout(container4)
        add_signature_button = QtWidgets.QPushButton("Add signature")
        remove_signature_button = QtWidgets.QPushButton("Remove signature")
        container4.addWidget(add_signature_button)
        container4.addWidget(remove_signature_button)

        self.signature_line_edit.returnPressed.connect(self.add_signature)
        add_signature_button.clicked.connect(self.add_signature)
        remove_signature_button.clicked.connect(self.remove_signature)
        self.signatures_list.itemActivated.connect(self.signature_selected)
        self.subsignatures_list.itemActivated.connect(self.subsignature_selected)

        item = QtWidgets.QListWidgetItem("Clear selection")
        item.parsed_signature = None
        self.signatures_list.addItem(item)

        self.setLayout(container3) 
开发者ID:Cisco-Talos,项目名称:CASC,代码行数:47,代码来源:casc_plugin.py

示例11: init_tree_widget

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QFrame [as 别名]
def init_tree_widget(self):
        v_box = QtGui.QVBoxLayout(self.tree_widget)
        preview_button = QtGui.QPushButton('Preview', self.tree_widget)
        preview_button.clicked.connect(self.abs_preview)
        self.fast_preview = QtGui.QCheckBox("Fast preview", self.tree_widget)
        line = QtGui.QFrame(self.tree_widget)
        line.setFrameShape(QtGui.QFrame.HLine);
        line.setFrameShadow(QtGui.QFrame.Sunken);
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        h_box.addWidget(preview_button)
        h_box.addWidget(self.fast_preview)
        v_box.addLayout(h_box)
        v_box.addWidget(line)
        self.tree_vbox.addLayout(v_box)

        # Add part buttons
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        add_parts_button = QtGui.QPushButton('Add parts', self.tree_widget)
        add_parts_button.clicked.connect(self.add_parts)
        add_same_part_button = QtGui.QPushButton('Add same parts', self.tree_widget)
        add_same_part_button.clicked.connect(self.add_same_parts)
        h_box.addWidget(add_parts_button)
        h_box.addWidget(add_same_part_button)
        self.tree_vbox.addLayout(h_box)
        # Add faces buttons
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        self.tab_type_box = QtGui.QComboBox(self.tree_widget)
        self.tab_type_box.addItems([TabProperties.TYPE_TAB, TabProperties.TYPE_T_SLOT,
                                    TabProperties.TYPE_CONTINUOUS])#, TabProperties.TYPE_FLEX])
        h_box.addWidget(self.tab_type_box)
        add_faces_button = QtGui.QPushButton('Add faces', self.tree_widget)
        add_faces_button.clicked.connect(self.add_tabs)
        add_same_faces_button = QtGui.QPushButton('Add same faces', self.tree_widget)
        add_same_faces_button.clicked.connect(self.add_same_tabs)
        h_box.addWidget(add_faces_button)
        h_box.addWidget(add_same_faces_button)
        self.tree_vbox.addLayout(h_box)
        # tree
        self.selection_model = self.tree_view_widget.selectionModel()
        self.selection_model.selectionChanged.connect(self.selection_changed)
        self.tree_vbox.addWidget(self.tree_view_widget)
        remove_item_button = QtGui.QPushButton('Remove item', self.tree_widget)
        remove_item_button.clicked.connect(self.remove_items)
        self.tree_vbox.addWidget(remove_item_button)
        line = QtGui.QFrame(self.tree_widget)
        line.setFrameShape(QtGui.QFrame.HLine)
        line.setFrameShadow(QtGui.QFrame.Sunken)
        self.tree_vbox.addWidget(line)
        # test layout
        self.edit_items_layout = QtGui.QVBoxLayout(self.tree_widget)
        self.tree_vbox.addLayout(self.edit_items_layout) 
开发者ID:execuc,项目名称:LCInterlocking,代码行数:53,代码来源:treepanel.py


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