當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。