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


Python QtGui.QLineEdit方法代码示例

本文整理汇总了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) 
开发者ID:DroidTest,项目名称:TimeMachine,代码行数:24,代码来源:xrefwindow.py

示例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) 
开发者ID:DroidTest,项目名称:TimeMachine,代码行数:21,代码来源:stringswindow.py

示例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) 
开发者ID:DroidTest,项目名称:TimeMachine,代码行数:27,代码来源:renamewindow.py

示例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()) 
开发者ID:glamrock,项目名称:Satori,代码行数:23,代码来源:mainform.py

示例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) 
开发者ID:ahmidou,项目名称:Fabric-RBF,代码行数:18,代码来源:CanvasRbfEditor.py

示例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 
开发者ID:hamish2014,项目名称:FreeCAD_drawing_dimensioning,代码行数:24,代码来源:preferences.py

示例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) 
开发者ID:juanvanyo,项目名称:FreeCAD-GDT,代码行数:20,代码来源:GDT.py

示例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) 
开发者ID:PySimulator,项目名称:PySimulator,代码行数:19,代码来源:windowConsole.py

示例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() 
开发者ID:onethawt,项目名称:idapyscripts,代码行数:16,代码来源:dataxrefcounter.py

示例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

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

示例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())

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

示例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) 
开发者ID:tritemio,项目名称:FRETBursts,代码行数:13,代码来源:matplotlib_figure_mod_toolbar.py

示例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 
开发者ID:AirbusCyber,项目名称:grap,代码行数:11,代码来源:QtShim.py

示例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) 
开发者ID:mwisslead,项目名称:vfp2py,代码行数:5,代码来源:vfpfunc.py

示例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) 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:36,代码来源:importDatumCmd.py


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