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


Python QtWidgets.QPlainTextEdit方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def __init__(self, parent=None, label_txt="", text_txt=""):
        super().__init__(parent=parent)

        h_box = QHBoxLayout(self)

        v_box = QVBoxLayout()
        icon = QLabel()
        icon.setPixmap(QIcon('assets/icons/issue.svg').pixmap(QSize(75, 75)))
        icon.setAlignment(Qt.AlignTop)
        h_box.addWidget(icon)

        label = QLabel(label_txt)
        v_box.addWidget(label)

        text = QPlainTextEdit(text_txt)
        text.setReadOnly(True)
        text.setMinimumWidth(550)
        text.setMinimumHeight(300)
        v_box.addWidget(text)
        h_box.addLayout(v_box)

        self.title = "Error" 
开发者ID:iGio90,项目名称:Dwarf,代码行数:24,代码来源:error_dlg.py

示例2: setupLayout

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupLayout(self):
        ###
        self.labelPath = QtWidgets.QLineEdit() # this is the extra input field to insert the path to brute force
        self.labelPath.setFixedWidth(800)
        self.labelPath.setText('-m "/login/login.html:username=^USER^&password=^PASS^&Login=Login:failed"')
        ###

        self.layoutAddOptions = QtWidgets.QHBoxLayout()
        self.layoutAddOptions.addWidget(self.labelPath)
        self.labelPath.hide()
        self.layoutAddOptions.addStretch()
        
        self.display = QtWidgets.QPlainTextEdit()
        self.display.setReadOnly(True)
        if self.settings.general_tool_output_black_background == 'True':
            self.__drawPalette()

        self.vlayout = QtWidgets.QVBoxLayout()
        self.vlayout.addLayout(self.setupLayoutHlayout())
        self.vlayout.addLayout(self.setupLayoutHlayout4())
        self.vlayout.addLayout(self.layoutAddOptions)
        self.vlayout.addLayout(self.setupLayoutHlayout2())
        self.vlayout.addLayout(self.setupLayoutHlayout3())
        self.vlayout.addWidget(self.display)
        self.setLayout(self.vlayout) 
开发者ID:GoVanguard,项目名称:legion,代码行数:27,代码来源:dialogs.py

示例3: setupBottom2Panel

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupBottom2Panel(self):
        # Log Tab
        self.LogTab = QtWidgets.QWidget()
        self.LogTab.setObjectName(_fromUtf8("LogTab"))
        self.LogTabLayout = QtWidgets.QHBoxLayout(self.LogTab)
        self.LogTabLayout.setObjectName(_fromUtf8("LogTabLayout"))
        self.LogOutputTextView = QPlainTextEditLogger(self.LogTab)
        self.LogOutputTextView.widget.setObjectName(_fromUtf8("LogOutputTextView"))
        self.LogOutputTextView.widget.setReadOnly(True)
        self.LogTabLayout.addWidget(self.LogOutputTextView.widget)
        self.BottomTabWidget.addTab(self.LogTab, _fromUtf8(""))
        log.addHandler(self.LogOutputTextView)

        # Python Tab - Disabled until next release
        #self.PythonTab = QtWidgets.QWidget()
        #self.PythonTab.setObjectName(_fromUtf8("PythonTab"))
        #self.PythonOutputTextView = QtWidgets.QPlainTextEdit(self.PythonTab)
        #self.PythonOutputTextView.setReadOnly(False)
        #self.PythonTabLayout = QtWidgets.QHBoxLayout(self.PythonTab)
        #self.PythonTabLayout.addWidget(self.PythonOutputTextView)
        #self.BottomTabWidget.addTab(self.PythonTab, _fromUtf8("")) 
开发者ID:GoVanguard,项目名称:legion,代码行数:23,代码来源:gui.py

示例4: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def __init__(self, *args, **kwargs):
        super(Window, self).__init__(*args, **kwargs)
        layout = QVBoxLayout(self)

        btn1 = QPushButton('按钮点击信号', self)
        btn1.setObjectName('ClickBtn')
        btn1.clicked.connect(self.onClicked)

        layout.addWidget(btn1)
        layout.addWidget(QPushButton(
            '按钮按下信号', self, objectName='PressBtn', pressed=self.onPressed))
        layout.addWidget(QPushButton(
            '按钮释放信号', self, objectName='ReleaseBtn', released=self.onReleased))
        layout.addWidget(QPushButton(
            '按钮选中信号', self, checkable=True, objectName='ToggleBtn', toggled=self.onToggled))

        self.resultView = QPlainTextEdit(self)
        self.resultView.setReadOnly(True)
        layout.addWidget(self.resultView) 
开发者ID:PyQt5,项目名称:PyQt,代码行数:21,代码来源:SignalsExample.py

示例5: setenableci

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setenableci(self, enabled):
        """This function will either enable or disable the editable QtWidgets in
        this ci frame.

        :param enabled: boolean to enable or disable
        @author: Brandon Gonzales

        """
        for opt in self.rule_config_opts:
            datatype = opt.getdatatype()
            name = opt.getkey()
            myuc = self.findChild(QtWidgets.QPlainTextEdit, 'ucvalue' + name)
            if datatype == 'string':
                mydata = self.findChild(QtWidgets.QLineEdit, 'value' + name)
                mydata.setEnabled(enabled)
            elif datatype == 'bool':
                mydata = self.findChild(QtWidgets.QCheckBox, 'value' + name)
                mydata.setEnabled(enabled)
            elif datatype == 'list':
                mydata = self.findChild(QtWidgets.QLineEdit, 'value' + name)
                mydata.setEnabled(enabled)
        return 
开发者ID:CSD-Public,项目名称:stonix,代码行数:24,代码来源:gui_pyqt5.py

示例6: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupUi(self, LoggingDialog):
        LoggingDialog.setObjectName("LoggingDialog")
        LoggingDialog.resize(697, 474)
        self.verticalLayout = QtWidgets.QVBoxLayout(LoggingDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.loggingPlainTextEdit = QtWidgets.QPlainTextEdit(LoggingDialog)
        self.loggingPlainTextEdit.setObjectName("loggingPlainTextEdit")
        self.verticalLayout.addWidget(self.loggingPlainTextEdit)

        self.retranslateUi(LoggingDialog)
        QtCore.QMetaObject.connectSlotsByName(LoggingDialog) 
开发者ID:iris-edu,项目名称:pyweed,代码行数:13,代码来源:LoggingDialog.py

示例7: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupUi(self, IDAngrConstraintsDialog):
        IDAngrConstraintsDialog.setObjectName("IDAngrConstraintsDialog")
        IDAngrConstraintsDialog.resize(811, 599)
        self.gridLayout_2 = QtWidgets.QGridLayout(IDAngrConstraintsDialog)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.constrEdit = QtWidgets.QPlainTextEdit(IDAngrConstraintsDialog)
        self.constrEdit.setEnabled(True)
        self.constrEdit.setObjectName("constrEdit")
        self.gridLayout_2.addWidget(self.constrEdit, 0, 0, 1, 1)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.savedsBtn = QtWidgets.QPushButton(IDAngrConstraintsDialog)
        self.savedsBtn.setEnabled(True)
        self.savedsBtn.setObjectName("savedsBtn")
        self.gridLayout.addWidget(self.savedsBtn, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrConstraintsDialog)
        self.buttonBox.setMinimumSize(QtCore.QSize(0, 48))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 0, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)

        self.retranslateUi(IDAngrConstraintsDialog)
        self.buttonBox.accepted.connect(IDAngrConstraintsDialog.accept)
        self.buttonBox.rejected.connect(IDAngrConstraintsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrConstraintsDialog) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:29,代码来源:constraints.py

示例8: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupUi(self, IDAngrSavedsDialog):
        IDAngrSavedsDialog.setObjectName("IDAngrSavedsDialog")
        IDAngrSavedsDialog.resize(941, 569)
        self.gridLayout = QtWidgets.QGridLayout(IDAngrSavedsDialog)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(IDAngrSavedsDialog)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.selectorList = QtWidgets.QListView(self.splitter)
        self.selectorList.setMaximumSize(QtCore.QSize(270, 16777215))
        self.selectorList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.selectorList.setObjectName("selectorList")
        self.codeView = QtWidgets.QPlainTextEdit(self.splitter)
        self.codeView.setReadOnly(True)
        self.codeView.setObjectName("codeView")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrSavedsDialog)
        self.buttonBox.setMaximumSize(QtCore.QSize(16777215, 48))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)

        self.retranslateUi(IDAngrSavedsDialog)
        self.buttonBox.accepted.connect(IDAngrSavedsDialog.accept)
        self.buttonBox.rejected.connect(IDAngrSavedsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrSavedsDialog) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:29,代码来源:saveds.py

示例9: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setupUi(self, IDAngrTextViewer):
        IDAngrTextViewer.setObjectName("IDAngrTextViewer")
        IDAngrTextViewer.resize(812, 612)
        self.gridLayout = QtWidgets.QGridLayout(IDAngrTextViewer)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.plainBox = QtWidgets.QRadioButton(IDAngrTextViewer)
        self.plainBox.setChecked(True)
        self.plainBox.setObjectName("plainBox")
        self.horizontalLayout.addWidget(self.plainBox)
        self.hexBox = QtWidgets.QRadioButton(IDAngrTextViewer)
        self.hexBox.setObjectName("hexBox")
        self.horizontalLayout.addWidget(self.hexBox)
        self.pyBox = QtWidgets.QRadioButton(IDAngrTextViewer)
        self.pyBox.setObjectName("pyBox")
        self.horizontalLayout.addWidget(self.pyBox)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(IDAngrTextViewer)
        self.plainTextEdit.setReadOnly(True)
        self.plainTextEdit.setPlainText("")
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.gridLayout.addWidget(self.plainTextEdit, 1, 0, 1, 1)

        self.retranslateUi(IDAngrTextViewer)
        QtCore.QMetaObject.connectSlotsByName(IDAngrTextViewer) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:28,代码来源:viewer.py

示例10: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def __init__(self, parent=None):
        QtWidgets.QFrame.__init__(self, parent=parent)

        self.logger = QtWidgets.QPlainTextEdit(parent=self)
        self.logger.setReadOnly(True)
        self.logger.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap)
        self.logger.setMinimumWidth(1100)
        self.buffer = ''

        self.clear_button = QtWidgets.QPushButton('Clear Log', parent=self)
        self.clear_button.clicked.connect(self.clear_log)
        self.save_button = QtWidgets.QPushButton('Save Log As...', parent=self)
        self.save_button.clicked.connect(self.save_log)

        self.lay = QtWidgets.QVBoxLayout(self)
        self.lay.addWidget(self.logger)
        self.lay.addWidget(self.clear_button)
        self.lay.addWidget(self.save_button) 
开发者ID:ucb-art,项目名称:BAG_framework,代码行数:20,代码来源:gui.py

示例11: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.setLayout(QVBoxLayout())
        self.layout().setAlignment(Qt.AlignTop)

        self.groupBox = QGroupBox(self)
        self.groupBox.setGeometry(self.geometry())
        self.groupBox.setLayout(QVBoxLayout())
        self.layout().addWidget(self.groupBox)

        self.textEdit = QPlainTextEdit(self.groupBox)
        self.groupBox.layout().addWidget(self.textEdit)

        self.warning = QLabel(self.groupBox)
        self.warning.setAlignment(QtCore.Qt.AlignCenter)
        self.warning.setStyleSheet('color: #FF2222; font-weight: bold')
        self.groupBox.layout().addWidget(self.warning)

        self.retranslateUi() 
开发者ID:FrancescoCeruti,项目名称:linux-show-player,代码行数:21,代码来源:user_element.py

示例12: CreateTextEdit

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def CreateTextEdit(self):
        """
        Make the text edit
        """
        self.TextEdit = QtWidgets.QPlainTextEdit()
        self.TextEditProxy = globals.mainWindow.scene.addWidget(self.TextEdit)
        self.TextEditProxy.setZValue(self.zval)
        self.TextEditProxy.setCursor(Qt.IBeamCursor)
        self.TextEditProxy.boundingRect = lambda self: QtCore.QRectF(0, 0, 4000, 4000)
        self.TextEdit.setVisible(False)
        self.TextEdit.setMinimumWidth(8 * globals.TileWidth)
        self.TextEdit.setMinimumHeight(16 * globals.TileWidth / 3)
        self.TextEdit.setMaximumWidth(8 * globals.TileWidth)
        self.TextEdit.setMaximumHeight(16 * globals.TileWidth / 3)
        self.TextEdit.setPlainText(self.text)
        self.TextEdit.textChanged.connect(self.handleTextChanged)
        self.TextEdit.zoomIn(13)
        self.reposTextEdit() 
开发者ID:aboood40091,项目名称:Miyamoto,代码行数:20,代码来源:items.py

示例13: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
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) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:9,代码来源:LNTextEdit.py

示例14: wheelEvent

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def wheelEvent(self, event, forward=True):
            if event.modifiers() == QtCore.Qt.ControlModifier:
                if self.zoomWheelEnabled == 1:
                    if event.delta() == 120:
                        self.zoom_in()
                    elif event.delta() == -120:
                        self.zoom_out()
                event.ignore()
            QtWidgets.QPlainTextEdit.wheelEvent(self, event) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:11,代码来源:LNTextEdit.py

示例15: setWrap

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QPlainTextEdit [as 别名]
def setWrap(self, state):
        if state == 0:
            self.edit.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap)
        else:
            self.edit.setLineWrapMode(QtWidgets.QPlainTextEdit.WidgetWidth) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:7,代码来源:LNTextEdit.py


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