Python PySide.QtGui.QTextEdit() Examples
The following are 17
code examples of PySide.QtGui.QTextEdit().
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: FlowchartTemplate_pyside.py From soapy with GNU General Public License v3.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName("selInfoWidget") self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText("") self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName("selDescLabel") self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.selNameLabel.setFont(font) self.selNameLabel.setText("") self.selNameLabel.setObjectName("selNameLabel") self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName("selectedTree") self.selectedTree.headerItem().setText(0, "1") self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName("hoverText") self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName("view") self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #2
Source File: windowConsole.py From PySimulator with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.setLayout(QtGui.QGridLayout(self)) self.layout().setContentsMargins(0, 0, 0, 0) self.out = QtGui.QTextEdit(self) self.layout().addWidget(self.out, 0, 0) self.out.setStyleSheet("QTextEdit { background-color: white; color: black; font-weight: normal; }") self.out.setReadOnly(True) self.input = inputLine() self.layout().addWidget(self.input, 1, 0) self.input.commandEntered.connect(self.commandEntered) self.consoleAccessMutex = QtCore.QMutex()
Example #3
Source File: FlowchartTemplate_pyside.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName("selInfoWidget") self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText("") self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName("selDescLabel") self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.selNameLabel.setFont(font) self.selNameLabel.setText("") self.selNameLabel.setObjectName("selNameLabel") self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName("selectedTree") self.selectedTree.headerItem().setText(0, "1") self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName("hoverText") self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName("view") self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #4
Source File: exportPartToVRML.py From kicad-3d-models-in-freecad with GNU General Public License v2.0 | 5 votes |
def clear_console(): #clearing previous messages mw=FreeCADGui.getMainWindow() c=mw.findChild(QtGui.QPlainTextEdit, "Python console") c.clear() r=mw.findChild(QtGui.QTextEdit, "Report view") r.clear() #if not Mod_ENABLED:
Example #5
Source File: cq_model_generator.py From kicad-3d-models-in-freecad with GNU General Public License v2.0 | 5 votes |
def clear_console(): r"""Clears the FreeCAD Report & Python consoles """ mw = Gui.getMainWindow() mw.findChild(QtGui.QPlainTextEdit, "Python console").clear() mw.findChild(QtGui.QTextEdit, "Report view").clear()
Example #6
Source File: STEP_add_license.py From kicad-3d-models-in-freecad with GNU General Public License v2.0 | 5 votes |
def clear_console(): #clearing previous messages mw=Gui.getMainWindow() c=mw.findChild(QtGui.QPlainTextEdit, "Python console") c.clear() r=mw.findChild(QtGui.QTextEdit, "Report view") r.clear()
Example #7
Source File: exportPartToVRML.py From kicad-3d-models-in-freecad with GNU General Public License v2.0 | 5 votes |
def clear_console(): #clearing previous messages mw=FreeCADGui.getMainWindow() c=mw.findChild(QtGui.QPlainTextEdit, "Python console") c.clear() r=mw.findChild(QtGui.QTextEdit, "Report view") r.clear() #if not Mod_ENABLED:
Example #8
Source File: cq_model_generator.py From kicad-3d-models-in-freecad with GNU General Public License v2.0 | 5 votes |
def clear_console(): r"""Clears the FreeCAD Report & Python consoles """ mw = Gui.getMainWindow() mw.findChild(QtGui.QPlainTextEdit, "Python console").clear() mw.findChild(QtGui.QTextEdit, "Report view").clear()
Example #9
Source File: FlowchartTemplate_pyside.py From tf-pose with Apache License 2.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName("selInfoWidget") self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText("") self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName("selDescLabel") self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.selNameLabel.setFont(font) self.selNameLabel.setText("") self.selNameLabel.setObjectName("selNameLabel") self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName("selectedTree") self.selectedTree.headerItem().setText(0, "1") self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName("hoverText") self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName("view") self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #10
Source File: preferences.py From FreeCAD_drawing_dimensioning with GNU Lesser General Public License v2.1 | 5 votes |
def generateWidget( self, dimensioningProcess ): self.dimensioningProcess = dimensioningProcess self.textbox = QtGui.QTextEdit() self.revertToDefault() self.textbox.textChanged.connect( self.textChanged ) return DimensioningTaskDialog_generate_row_hbox( self.label, self.textbox )
Example #11
Source File: Asm4_Measure.py From FreeCAD_Assembly4 with GNU Lesser General Public License v2.1 | 5 votes |
def clearConsole(self): #clearing previous messages mw = Gui.getMainWindow() #c=mw.findChild(QtGui.QPlainTextEdit, "Python console") #c.clear() rv = mw.findChild(QtGui.QTextEdit, "Report view") rv.clear() # Actions # # when changing the measurement type, reset pre-existing selection
Example #12
Source File: QtShim.py From grap with MIT License | 5 votes |
def get_QTextEdit(): """QTextEdit getter.""" try: import PySide.QtGui as QtGui return QtGui.QTextEdit except ImportError: import PyQt5.QtWidgets as QtWidgets return QtWidgets.QTextEdit
Example #13
Source File: Commands.py From NodeEditor with MIT License | 5 votes |
def clearReportView(name="noname"): from PySide import QtGui mw=FreeCADGui.getMainWindow() r=mw.findChild(QtGui.QTextEdit, "Report view") r.clear() import time now = time.ctime(int(time.time())) #FreeCAD.Console.PrintWarning("Cleared Report view " +str(now)+" by " + name+"\n")
Example #14
Source File: options.py From dpa-pipe with MIT License | 5 votes |
def __init__(self, name, config, parent=None): ActionOption.__init__(self, name, config) QtGui.QTextEdit.__init__(self, parent=parent) self.setToolTip(self.tooltip) self.setText(str(self.default)) self.textChanged.connect(lambda: self.value_changed.emit()) # -----------------------------------------------------------------------------
Example #15
Source File: gui.py From epycyzm with MIT License | 4 votes |
def createMessageGroupBox(self): self.messageGroupBox = QtGui.QGroupBox("Balloon Message") typeLabel = QtGui.QLabel("Type:") self.typeComboBox = QtGui.QComboBox() self.typeComboBox.addItem("None", QtGui.QSystemTrayIcon.NoIcon) self.typeComboBox.addItem(self.style().standardIcon( QtGui.QStyle.SP_MessageBoxInformation), "Information", QtGui.QSystemTrayIcon.Information) self.typeComboBox.addItem(self.style().standardIcon( QtGui.QStyle.SP_MessageBoxWarning), "Warning", QtGui.QSystemTrayIcon.Warning) self.typeComboBox.addItem(self.style().standardIcon( QtGui.QStyle.SP_MessageBoxCritical), "Critical", QtGui.QSystemTrayIcon.Critical) self.typeComboBox.setCurrentIndex(1) self.durationLabel = QtGui.QLabel("Duration:") self.durationSpinBox = QtGui.QSpinBox() self.durationSpinBox.setRange(5, 60) self.durationSpinBox.setSuffix(" s") self.durationSpinBox.setValue(15) durationWarningLabel = QtGui.QLabel("(some systems might ignore this " "hint)") durationWarningLabel.setIndent(10) titleLabel = QtGui.QLabel("Title:") self.titleEdit = QtGui.QLineEdit("Cannot connect to network") bodyLabel = QtGui.QLabel("Body:") self.bodyEdit = QtGui.QTextEdit() self.bodyEdit.setPlainText("Don't believe me. Honestly, I don't have " "a clue.\nClick this balloon for details.") self.showMessageButton = QtGui.QPushButton("Show Message") self.showMessageButton.setDefault(True) messageLayout = QtGui.QGridLayout() messageLayout.addWidget(typeLabel, 0, 0) messageLayout.addWidget(self.typeComboBox, 0, 1, 1, 2) messageLayout.addWidget(self.durationLabel, 1, 0) messageLayout.addWidget(self.durationSpinBox, 1, 1) messageLayout.addWidget(durationWarningLabel, 1, 2, 1, 3) messageLayout.addWidget(titleLabel, 2, 0) messageLayout.addWidget(self.titleEdit, 2, 1, 1, 4) messageLayout.addWidget(bodyLabel, 3, 0) messageLayout.addWidget(self.bodyEdit, 3, 1, 2, 4) messageLayout.addWidget(self.showMessageButton, 5, 4) messageLayout.setColumnStretch(3, 1) messageLayout.setRowStretch(4, 1) self.messageGroupBox.setLayout(messageLayout)
Example #16
Source File: VariablesLib.py From FreeCAD_Assembly4 with GNU Lesser General Public License v2.1 | 4 votes |
def drawUI(self): # Our main window will be a QDialog # make this dialog stay above the others, always visible self.UI.setWindowFlags( QtCore.Qt.WindowStaysOnTopHint ) self.UI.setWindowTitle('Delete Variable') self.UI.setWindowIcon( QtGui.QIcon( os.path.join( Asm4.iconPath , 'FreeCad.svg' ) ) ) self.UI.setMinimumWidth(470) self.UI.resize(470,300) self.UI.setModal(False) # the layout for the main window is vertical (top to down) self.mainLayout = QtGui.QVBoxLayout(self.UI) # Define the fields for the form ( label + widget ) self.formLayout = QtGui.QFormLayout() # existing Variable self.varList = QtGui.QComboBox() self.formLayout.addRow(QtGui.QLabel('Variable'),self.varList) # Variable Name self.varName = QtGui.QLineEdit() self.formLayout.addRow(QtGui.QLabel('Name'),self.varName) # Variable Value self.varValue = QtGui.QLineEdit() self.formLayout.addRow(QtGui.QLabel('Value'),self.varValue) # Documentation self.description = QtGui.QTextEdit() self.formLayout.addRow(QtGui.QLabel('Description'),self.description) # apply the layout self.mainLayout.addLayout(self.formLayout) self.mainLayout.addStretch() # Buttons self.buttonLayout = QtGui.QHBoxLayout() # Cancel button self.CancelButton = QtGui.QPushButton('Cancel') # Delete button self.DelButton = QtGui.QPushButton('Delete') self.DelButton.setDefault(True) # the button layout self.buttonLayout.addWidget(self.CancelButton) self.buttonLayout.addStretch() self.buttonLayout.addWidget(self.DelButton) self.mainLayout.addLayout(self.buttonLayout) # finally, apply the layout to the main window self.UI.setLayout(self.mainLayout) # Actions self.varList.currentIndexChanged.connect( self.onSelectProp ) self.CancelButton.clicked.connect(self.onCancel) self.DelButton.clicked.connect(self.onDel)
Example #17
Source File: VariablesLib.py From FreeCAD_Assembly4 with GNU Lesser General Public License v2.1 | 4 votes |
def drawUI(self): # Our main window will be a QDialog # make this dialog stay above the others, always visible self.UI.setWindowFlags( QtCore.Qt.WindowStaysOnTopHint ) self.UI.setWindowTitle('Add Variable') self.UI.setWindowIcon( QtGui.QIcon( os.path.join( Asm4.iconPath , 'FreeCad.svg' ) ) ) self.UI.setMinimumWidth(470) self.UI.resize(470,300) self.UI.setModal(False) # the layout for the main window is vertical (top to down) self.mainLayout = QtGui.QVBoxLayout(self.UI) # Define the fields for the form ( label + widget ) self.formLayout = QtGui.QFormLayout() # Variable Type, combobox showing all available App::PropertyType self.typeList = QtGui.QComboBox() self.formLayout.addRow(QtGui.QLabel('Type'),self.typeList) # Variable Name self.varName = QtGui.QLineEdit() self.formLayout.addRow(QtGui.QLabel('Name'),self.varName) # Variable Value self.varValue = QtGui.QDoubleSpinBox() self.varValue.setRange( -1000000.0, 1000000.0 ) self.formLayout.addRow(QtGui.QLabel('Value'),self.varValue) # Documentation self.description = QtGui.QTextEdit() self.formLayout.addRow(QtGui.QLabel('Description'),self.description) # apply the layout self.mainLayout.addLayout(self.formLayout) self.mainLayout.addStretch() # Buttons self.buttonLayout = QtGui.QHBoxLayout() # Cancel button self.CancelButton = QtGui.QPushButton('Cancel') # OK button self.OkButton = QtGui.QPushButton('OK') self.OkButton.setDefault(True) # the button layout self.buttonLayout.addWidget(self.CancelButton) self.buttonLayout.addStretch() self.buttonLayout.addWidget(self.OkButton) self.mainLayout.addLayout(self.buttonLayout) # finally, apply the layout to the main window self.UI.setLayout(self.mainLayout) # Actions self.CancelButton.clicked.connect(self.onCancel) self.OkButton.clicked.connect(self.onOK)