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


Python QtGui.QTextEdit方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:38,代码来源:FlowchartTemplate_pyside.py

示例2: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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())

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

示例3: clearReportView

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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") 
开发者ID:microelly2,项目名称:NodeEditor,代码行数:10,代码来源:Commands.py

示例4: get_QTextEdit

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
def get_QTextEdit():
    """QTextEdit getter."""

    try:
        import PySide.QtGui as QtGui
        return QtGui.QTextEdit
    except ImportError:
        import PyQt5.QtWidgets as QtWidgets
        return QtWidgets.QTextEdit 
开发者ID:AirbusCyber,项目名称:grap,代码行数:11,代码来源:QtShim.py

示例5: clearConsole

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:13,代码来源:Asm4_Measure.py

示例6: generateWidget

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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 ) 
开发者ID:hamish2014,项目名称:FreeCAD_drawing_dimensioning,代码行数:8,代码来源:preferences.py

示例7: clear_console

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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() 
开发者ID:easyw,项目名称:kicad-3d-models-in-freecad,代码行数:8,代码来源:cq_model_generator.py

示例8: clear_console

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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: 
开发者ID:easyw,项目名称:kicad-3d-models-in-freecad,代码行数:11,代码来源:exportPartToVRML.py

示例9: clear_console

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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() 
开发者ID:easyw,项目名称:kicad-3d-models-in-freecad,代码行数:9,代码来源:STEP_add_license.py

示例10: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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() 
开发者ID:PySimulator,项目名称:PySimulator,代码行数:14,代码来源:windowConsole.py

示例11: drawUI

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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) 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:52,代码来源:VariablesLib.py

示例12: createMessageGroupBox

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QTextEdit [as 别名]
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) 
开发者ID:slush0,项目名称:epycyzm,代码行数:58,代码来源:gui.py


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