Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

QLineEdit autocomplete python

from PyQt5.QtWidgets import *
import sys

class Window(QWidget):
    def __init__(self):
        QWidget.__init__(self)
        layout = QGridLayout()
        self.setLayout(layout)

        # auto complete options                                                 
        names = ["Apple", "Alps", "Berry", "Cherry" ]
        completer = QCompleter(names)

        # create line edit and add auto complete                                
        self.lineedit = QLineEdit()
        self.lineedit.setCompleter(completer)
        layout.addWidget(self.lineedit, 0, 0)

app = QApplication(sys.argv)
screen = Window()
screen.show()
sys.exit(app.exec_())
Comment

PREVIOUS NEXT
Code Example
Python :: python prayer time 
Python :: array must not contain infs or NaNs 
Python :: in 2002 elon musk age 
Python :: sigmoid in python from scratch 
Python :: get datafram colum names as list python 
Python :: image to array keras 
Python :: last 24 hour python datetime 
Python :: python counter get most common 
Python :: python record screen 
Python :: how to ask someone for their name in python 
Python :: python tkinter text widget 
Python :: pandas dataframe aggregations 
Python :: python pickle save and load multiple variables 
Python :: join pyspark stackoverflow 
Python :: somma in python 
Python :: how to install python3.6 on ubuntu 
Python :: python stack class 
Python :: pandas count rows with value 
Python :: python get home path 
Python :: plt turn legend off 
Python :: django admin order by 
Python :: yesno django 
Python :: python requests token x-www-form-urlencoded 
Python :: create a dataframe with series 
Python :: native bold text 
Python :: igraph adjacency matrix python 
Python :: python write to text file with new line 
Python :: how to clear checkbox in tkinter 
Python :: pandas query like 
Python :: python set label colour 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =