Python Forum
PyQt5: How do you set the user input of a line edit to a specific variable?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyQt5: How do you set the user input of a line edit to a specific variable?
#1
Hello!

I made a program using PyQt5. The main problem however is trying to get the program to read a user input in the Qlineedit widget

my goal is to transfer the user input of the Qlinedit to a variable or a database (something.db file) via confirmation button like in a registration form or such.

I don't exactly know how to get to make a program that can read the user input from QlineEdit and transfer that said input to a variable or a database. Please help! A snippet of my code below:

    self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
    self.lineEdit.setGeometry(QtCore.QRect(260, 310, 241, 31))
    self.lineEdit.setObjectName("lineEdit")
    self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget)
    self.lineEdit_2.setGeometry(QtCore.QRect(260, 340, 241, 31))
    self.lineEdit_2.setObjectName("lineEdit_2")
    self.lineEdit_2.setEchoMode(QtWidgets.QLineEdit.Password)
thanks in advance!!
Reply


Messages In This Thread
PyQt5: How do you set the user input of a line edit to a specific variable? - by YoshikageKira - Dec-23-2019, 08:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] PyQt5 QTableView SQLite : edit cell HeinKurz 2 2,638 Mar-27-2023, 10:41 AM
Last Post: HeinKurz
  [PyGUI] [Solved]Help storing in user input from line edit Extra 2 1,893 May-12-2022, 07:46 PM
Last Post: Extra
  [Tkinter] Help with input from specific devices Noob_hobbyist 3 2,513 Feb-02-2021, 04:11 AM
Last Post: deanhystad
  Convert combobox user input in to date with tkinter Ame 8 6,987 Jul-01-2020, 09:40 PM
Last Post: Yoriz
  Create an identification code from user input PeroPuri 1 1,969 Apr-11-2020, 11:56 AM
Last Post: Larz60+
  [PyQt] Python PyQt5 - Change label text dynamically based on user Input ppel123 1 13,938 Mar-20-2020, 07:21 AM
Last Post: deanhystad
  [Tkinter] Is there a way to sleep without stopping user input? GalaxyCoyote 2 2,212 Oct-23-2019, 06:23 PM
Last Post: Denni
  [Tkinter] Registering user's drop down menu choice and finding corresponding line in files ShadeLily 2 2,108 Oct-03-2019, 06:28 PM
Last Post: joe_momma
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,937 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [Tkinter] help please, checking the user input and outputting the result tomkovladko 3 2,837 Mar-05-2019, 08:58 PM
Last Post: joe_momma

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020