Python PySide.QtGui.QFrame() Examples
The following are 14
code examples of PySide.QtGui.QFrame().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PySide.QtGui
, or try the search function
.
Example #1
Source File: LNTextEdit.py From universal_tool_template.py with MIT License | 6 votes |
def __init__(self, *args): QtWidgets.QPlainTextEdit.__init__(self, *args) self.setFrameStyle(QtWidgets.QFrame.NoFrame) self.zoomWheelEnabled = 0 self.highlight() #self.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap) self.cursorPositionChanged.connect(self.highlight)
Example #2
Source File: LNTextEdit.py From universal_tool_template.py with MIT License | 6 votes |
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)
Example #3
Source File: LNTextEdit_v3.2.py From universal_tool_template.py with MIT License | 6 votes |
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)
Example #4
Source File: base.py From dpa-pipe with MIT License | 5 votes |
def _separator(self): sep = QtGui.QFrame() sep.setFrameStyle(QtGui.QFrame.HLine | QtGui.QFrame.Plain) return sep # -------------------------------------------------------------------------
Example #5
Source File: vfpfunc.py From vfp2py with MIT License | 5 votes |
def __init__(self, *args, **kwargs): QtGui.QFrame.__init__(self) Custom.__init__(self, *args, **kwargs) self.setFrameStyle(QtGui.QFrame.Box | QtGui.QFrame.Plain)
Example #6
Source File: vfpfunc.py From vfp2py with MIT License | 5 votes |
def __init__(self, *args, **kwargs): QtGui.QFrame.__init__(self) Custom.__init__(self, *args, **kwargs) self.setFrameStyle(QtGui.QFrame.VLine | QtGui.QFrame.Plain) palette = self.palette() palette.setColor(self.foregroundRole(), QtGui.QColor(0, 0, 0, 0)) self.setPalette(palette) margin = 4 self.setContentsMargins(margin, 0, margin, 0)
Example #7
Source File: recipe-578634.py From code with MIT License | 5 votes |
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)
Example #8
Source File: LNTextEdit.py From universal_tool_template.py with MIT License | 5 votes |
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)
Example #9
Source File: LNTextEdit_v3.2.py From universal_tool_template.py with MIT License | 5 votes |
def __init__(self, *args): QtGui.QPlainTextEdit.__init__(self, *args) self.setFrameStyle(QtGui.QFrame.NoFrame) self.zoomWheelEnabled = 0 self.highlight() #self.setLineWrapMode(QtGui.QPlainTextEdit.NoWrap) self.cursorPositionChanged.connect(self.highlight)
Example #10
Source File: plots.py From autopilot with Mozilla Public License 2.0 | 5 votes |
def __init__(self): # type: () -> None super(HLine, self).__init__() self.setFrameShape(QtGui.QFrame.HLine) self.setFrameShadow(QtGui.QFrame.Sunken)
Example #11
Source File: crosspiece.py From LCInterlocking with GNU Lesser General Public License v2.1 | 5 votes |
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)
Example #12
Source File: structure_dialog_UI_pyside.py From anima with MIT License | 4 votes |
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)
Example #13
Source File: casc_plugin.py From CASC with GNU General Public License v2.0 | 4 votes |
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)
Example #14
Source File: treepanel.py From LCInterlocking with GNU Lesser General Public License v2.1 | 4 votes |
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)