Questions tagged [qlineedit]

QLineEdit is a component of the Qt library which is basically a text editor that has only one line, and which allows one to make inputting and editing of text. A related class is QTextEdit which allows multi-line, rich text editing.

A minimalistic example of a QLineEdit that is shown in a new window, and contains the infamous "Hello, World!" line:

#include <QtGui>
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a( argc, argv );
    QLineEdit * myLine = new QLineEdit( "Hello, World!" );
    myLine->show();
    return a.exec();
}

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

600 questions
-1
votes
1 answer

I can't see QLabel and QLineEdit widgets in my QMainWindow in Python2

I wrote this code and I don't understand why widgets QLabel and QLineEdit don't show up? Do I have to put them in another class? It's Python2.7 and PySide. This is how a window looks like when I run the code: #!/usr/bin/env python # coding:…
Hrvoje T
  • 3,365
  • 4
  • 28
  • 41
-1
votes
1 answer

How to get text from a QLineEdit dynamically?

How could get String(Text) from QlineEdit? I tried Like this. myArea.getList() function is get string value and check database with string value and return List self.a = QLineEdit() self.b = QlineEdit() .... self.b =…
-1
votes
1 answer

Event textChanged on dynamically created QLineEdit

I have some code in on_pushButton_clicked() that creates another QLineEdit, and I would like to ask you how can I access the on_lineEdit_textChanged() event of that new QLineEdit.
tomsk
  • 967
  • 2
  • 13
  • 29
-1
votes
1 answer

How do I get the input from a PyQt linedit object?

I want to take the information entered by the user in the lineedit object: And store it in this variable: Here is a snippet of code for the lineedit object: self.nameLe = QtGui.QLineEdit(ContactCreator) self.nameLe.setGeometry(QtCore.QRect(10, 60,…
bmanner
  • 3
  • 1
  • 3
-1
votes
2 answers

QT 5.4.1 sending value in the form1 mainwidow to form2

I am a beginner in QT. I would like to send the value back into the LineEdit mainwindow to GraphicsWidget window to make calculations. mainwindow.ccp int value=ui->lineEdit->text().toInt(); GraphicsWidget.ccp qDebug()<
ibra
  • 1
-1
votes
1 answer

how to obtain string values of a list

I'm a beginner in PyQt and I made a FORMULAR. self.tName1, self.tlName1, self.tCel, self.tCel1,self.tcc1, self.tEmail, self.tTel are QLineEdit and I put all these variables in a list. Then, I made a for loop in order to evaluate each QLineEdit value…
Margarita Gonzalez
  • 1,127
  • 7
  • 20
  • 39
-1
votes
1 answer

Update QLineEdit with Signal and Slot QT

I am writing to ask for advice on how best to implement my code using QT library. I have a class called Action class that every one second retrieve the PC time (with gettimeofday), this value shall be displayed in the GUI. So I have a class widget…
-1
votes
1 answer

get value as integer from QlineEdit and bindit in sqlite

i tried to entre data from a form " means from QlineEdit as integer " the programm is compiled successfully but when i open the form and entre data , the programm crach her's the erreur Object::connect: No such slot…
-1
votes
2 answers

Save a number with line edit in Qt

I want to save a number with a QLineEdit that is hidden from the users. I just want to use it for my programing. In the Visual Basic 6 we have "Tag" property with textbox that can save any value in it as a temporary value.
mohsen amiri
  • 73
  • 1
  • 2
  • 7
-2
votes
1 answer

How can I get the text from QlineEdits in two different windows? I'm using PySide2 within Maya

When I run the code, it will ALWAYS print out "First_TextSecond_Text", no matter what I put inside the lineEdits. I'd like to print out whatever the user puts in the windows. Run the code and get the "First Window". You'll be able to edit the text…
Lens
  • 19
  • 4
-2
votes
1 answer

How to get string inside QLineEdit (PyQt5 and Python)?

I was looking for an answer to this beginner question but only found long or complicated ones. I have a list of QLineEdits and now I want to get the string in one of them, how is this done? my_list = [] a =…
Johan
  • 863
  • 3
  • 13
  • 28
-2
votes
2 answers

QLineEdit: controlling the input validation while the input is being provided

I need to control the input that is being provided through a QLineEdit. The provided input will be checked to see if it meets certain criteria (i.e. particular letters, digits and symbols constraints) Tasks: This checking procedure has to be done…
eklavay.tonoy
  • 23
  • 1
  • 6
-2
votes
1 answer

Best way to run background "algrothim" which updates widgets Qt

So I have an GUI application which was created using a GridLayout. I made a bunch of QLineEdit widgets which need to be updated constantly with new values as they come in. What is the best and most efficient way to do this? Seems like a silly…
user2494298
  • 299
  • 3
  • 7
  • 23
-2
votes
1 answer

Example For using QSettings to save QLineEdit text

Can I get a line of code that saves text of QLineedit and on restarting the app , it is retrieved ? Please help , its very important for my project …
rajatgupta431
  • 121
  • 1
  • 2
  • 10
-3
votes
1 answer

QLineEdit: How to prevent user from entering asterisk (*)?

I'm using QLineEdit in my application. I want to prevent the user from entering '*' anywhere in the text. I tried to QRegExpValidator but could not able to set the proper regexp. Please help.
Ram
  • 1
1 2 3
39
40