本文整理汇总了Python中PySide.QtGui.QLineEdit方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QLineEdit方法的具体用法?Python QtGui.QLineEdit怎么用?Python QtGui.QLineEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui
的用法示例。
在下文中一共展示了QtGui.QLineEdit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self, parent=None, win=None, xrefs=None, headers=["Origin", "Method"]):
super(XrefListView, self).__init__(parent)
self.parent = parent
self.mainwin = win
self.xrefs = xrefs
self.headers = headers
self.setMinimumSize(600, 400)
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter origin pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.xrefwindow = XrefValueWindow(self, win, self.xrefs, self.headers)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.xrefwindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
示例2: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self, parent=None, win=None, session=None):
super(StringsWindow, self).__init__(parent)
self.mainwin = win
self.session = session
self.title = "Strings"
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter string pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.stringswindow = StringsValueWindow(self, win, session)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.stringswindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
示例3: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self, parent=None, win=None, element="", info=()):
super(RenameDialog, self).__init__(parent)
self.sourceWin = parent
self.info = info
self.element = element
title = "Rename: " + element
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
question = QtGui.QLabel("Please enter new name:")
layout.addWidget(question, 0, 0)
self.lineEdit = QtGui.QLineEdit()
layout.addWidget(self.lineEdit, 0, 1)
self.buttonOK = QtGui.QPushButton("OK", self)
layout.addWidget(self.buttonOK, 1, 1)
self.buttonCancel = QtGui.QPushButton("Cancel", self)
layout.addWidget(self.buttonCancel, 1, 0)
self.lineEdit.setText(self.element)
self.setLayout(layout)
self.buttonCancel.clicked.connect(self.cancelClicked)
self.buttonOK.clicked.connect(self.okClicked)
示例4: fill_bridges_list
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def fill_bridges_list(self):
self.bridges_layout = QtGui.QVBoxLayout(self.bridges_scrollarea_widget_contents)
self.bridges_layout.setContentsMargins(5, 5, 5, 5)
font = self.get_default_font(8)
def bridges_factory(bridge):
edit = QtGui.QLineEdit(bridge)
edit.setFont(font)
edit.setStyleSheet("color:white;background:rgba(142, 116, 173, 100);border: 0px;border-radius: 5px;")
edit.setReadOnly(True)
return edit
with open("bridges.json", 'r') as f:
bridges_list = json.load(f)
for bridge in bridges_list:
bridge_widget = bridges_factory(bridge)
self.bridges_layout.addWidget(bridge_widget)
self.bridges_layout.addStretch()
self.software_scrollarea.setWidget(self.software_layout.widget())
示例5: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self,orientation,parent=None):
super(MetaHeaderView, self).__init__(orientation,parent)
self.setMovable(True)
self.setClickable(True)
# This block sets up the edit line by making setting the parent
# to the Headers Viewport.
self.line = QtGui.QLineEdit(parent=self.viewport()) #Create
self.line.setAlignment(QtCore.Qt.AlignTop) # Set the Alignmnet
self.line.setHidden(True) # Hide it till its needed
# This is needed because I am having a werid issue that I believe has
# to do with it losing focus after editing is done.
self.line.blockSignals(True)
self.sectionedit = 0
# Connects to double click
self.sectionDoubleClicked.connect(self.editHeader)
self.line.editingFinished.connect(self.doneEditing)
示例6: generateWidget
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def generateWidget( self, dimensioningProcess, width = 60, height = 30 ):
self.dimensioningProcess = dimensioningProcess
colorBox = QtGui.QGraphicsView( self.graphicsScene )
colorBox.setMaximumWidth( width )
colorBox.setMaximumHeight( height )
colorBox.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff )
colorBox.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff )
self.family_textbox = QtGui.QLineEdit()
self.size_textbox = QtGui.QLineEdit()
groupbox = QtGui.QGroupBox(self.label)
hbox = QtGui.QHBoxLayout()
hbox.addWidget( self.family_textbox )
hbox.addStretch(1)
hbox.addWidget( self.size_textbox )
hbox.addStretch(1)
hbox.addWidget( colorBox )
groupbox.setLayout(hbox)
self.revertToDefault()
self.family_textbox.textChanged.connect( self.update_dimensionConstructorKWs )
self.size_textbox.textChanged.connect( self.update_dimensionConstructorKWs )
return groupbox
示例7: generateWidget
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def generateWidget( self, idGDT, ContainerOfData ):
self.idGDT = idGDT
self.ContainerOfData = ContainerOfData
self.lineEdit = QtGui.QLineEdit()
if self.Mask <> None:
self.lineEdit.setInputMask(self.Mask)
if self.Dictionary == None:
self.lineEdit.setText('text')
self.text = 'text'
else:
NumberOfObjects = self.getNumberOfObjects()
if NumberOfObjects > len(self.Dictionary)-1:
NumberOfObjects = len(self.Dictionary)-1
self.lineEdit.setText(self.Dictionary[NumberOfObjects])
self.text = self.Dictionary[NumberOfObjects]
self.lineEdit.textChanged.connect(self.valueChanged)
self.ContainerOfData.textName = self.text.strip()
return GDTDialog_hbox(self.Text,self.lineEdit)
示例8: keyPressEvent
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Up:
self.current = (self.current + 1) % len(self.history)
self.setText(self.history[len(self.history) - self.current - 1])
event.accept()
elif event.key() == QtCore.Qt.Key_Down:
self.current = (self.current - 1) % len(self.history)
self.setText(self.history[len(self.history) - self.current - 1])
event.accept()
elif event.key() == QtCore.Qt.Key_Return:
self.history.append(self.text())
self.commandEntered.emit(self.text())
self.clear()
self.current = -1
event.accept()
else:
QtGui.QLineEdit.keyPressEvent(self, event)
示例9: OnCreate
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def OnCreate(self, form):
self.parent = self.FormToPySideWidget(form)
self.tableWidget = QtGui.QTableWidget()
self.seg_combo = QtGui.QComboBox()
self.refcount_box = QtGui.QLineEdit()
self.export_btn = QtGui.QPushButton("Export")
self.export_btn.setDisabled(True)
self.scan_btn = QtGui.QPushButton("Scan")
self.minfilter_box = QtGui.QLineEdit()
self.maxfilter_box = QtGui.QLineEdit()
self.filter_btn = QtGui.QPushButton("Filter")
self.filter_btn.setDisabled(True)
self.sort_order = [QtCore.Qt.AscendingOrder, QtCore.Qt.AscendingOrder]
self.PopulateForm()
示例10: import_confirm_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def import_confirm_page(self):
if hasattr(self, '_import_confirm_page'):
return self._import_confirm_page
layout = QtGui.QVBoxLayout()
note_lbl = QtGui.QLabel(
"Describe the work you did on the entities being exported: (required)")
self._note_edit = QtGui.QLineEdit()
self._note_edit.setFocus()
self._note_edit.textChanged.connect(
lambda t: self._check_descriptions())
layout.addWidget(note_lbl)
layout.addWidget(self._note_edit)
layout.addSpacing(5)
self._import_confirm_page = QtGui.QWizardPage()
self._import_confirm_page.setTitle("Confirm")
self._import_confirm_page.setSubTitle(
"Describe and confirm the folowing imports :")
self._import_confirm_page.setLayout(layout)
return self._import_confirm_page
# -------------------------------------------------------------------------
示例11: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self, name, config, parent=None):
ActionOption.__init__(self, name, config)
QtGui.QLineEdit.__init__(self, parent=parent)
self.setToolTip(self.tooltip)
self.setText(str(self.default))
self.textChanged.connect(lambda t: self.value_changed.emit())
# -----------------------------------------------------------------------------
示例12: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self,fig):
self.fig = fig
toolbar = fig.canvas.toolbar
self.line_edit = QtGui.QLineEdit()
toolbar.addWidget(self.line_edit)
self.line_edit.editingFinished.connect(self.do_something)
self.spinbox = QtGui.QDoubleSpinBox()
toolbar.addWidget(self.spinbox)
self.spinbox.valueChanged.connect(self.do_something2)
示例13: get_QLineEdit
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def get_QLineEdit():
"""QLineEdit getter."""
try:
import PySide.QtGui as QtGui
return QtGui.QLineEdit
except ImportError:
import PyQt5.QtWidgets as QtWidgets
return QtWidgets.QLineEdit
示例14: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def __init__(self, *args, **kwargs):
QtGui.QLineEdit.__init__(self)
Custom.__init__(self, *args, **kwargs)
示例15: drawUI
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QLineEdit [as 别名]
def drawUI(self):
# Our main layoyt will be vertical
self.mainLayout = QtGui.QVBoxLayout(self.form)
# Define the fields for the form ( label + widget )
self.formLayout = QtGui.QFormLayout()
# Datum Type
self.datumType = QtGui.QLineEdit()
self.datumType.setReadOnly(True)
self.formLayout.addRow(QtGui.QLabel('Datum Type'),self.datumType)
# Datum Object
self.datumOrig = QtGui.QLineEdit()
self.datumOrig.setReadOnly(True)
self.formLayout.addRow(QtGui.QLabel('Orig. Datum'),self.datumOrig)
# Link instance
self.linkName = QtGui.QLineEdit()
self.linkName.setReadOnly(True)
self.formLayout.addRow(QtGui.QLabel('Orig. Instance'),self.linkName)
# Orig Part
self.partName = QtGui.QLineEdit()
self.partName.setReadOnly(True)
self.formLayout.addRow(QtGui.QLabel('Orig. Doc#Part'),self.partName)
# apply the layout
self.mainLayout.addLayout(self.formLayout)
# empty line
self.mainLayout.addWidget(QtGui.QLabel())
# the name as seen in the tree of the selected link
self.datumName = QtGui.QLineEdit()
self.mainLayout.addWidget(QtGui.QLabel("Enter the imported Datum's name :"))
self.mainLayout.addWidget(self.datumName)
# set main window widgets
self.form.setLayout(self.mainLayout)