qlineedit Questions

2

Solved

I have written a method that validate characters in the lineEdit: def is_validate(self): regex = QtCore.QRegExp("[a-z-A-Z_]+") txtDepartment_validator = QtGui.QRegExpValidator(regex, self.txtDe...
Fountain asked 21/12, 2015 at 15:48

4

Solved

In Qt, a created lineEdit shows a text using the setText() method. But the cursor is movable for the default text. I want the cursor should not be movable for the default text. My lineEdit type h...
Brahman asked 21/5, 2012 at 6:41

4

Solved

I'm trying to change the background color of the QLineEdit and I can't figure it out at all. I tried using stylesheets originally like this QLineEdit *le = new QLineEdit(); le->setStyleSheet("...
Anticyclone asked 3/12, 2014 at 23:12

1

Solved

QLineEdit has a signal QLineEdit::editingFinished that gets emitted when the user finished editing, for example by pressing enter. However if a validator or an input mask was set, then editingFinis...
Loosejointed asked 17/9, 2016 at 22:1

4

Solved

I am having a qt question. I want the QLineEdit widget to have the focus at application startup. Take the following code for example: #include <QtGui/QApplication> #include <QtGui/QHBoxLa...
Burst asked 9/2, 2009 at 0:28

3

Solved

I have a QLineEdit with an input mask, so that some kind of code can easily be entered (or pasted). Since you can place the cursor anywhere in the QLineEdit even if there is no text (because there ...
Zestful asked 20/3, 2014 at 12:10

3

Solved

I need to implement LineEdit widget with possibility to add tool buttons at the right end of text area. I know two ways of doing that but both solutions seems ugly. 1) add tool buttons as child wi...
Darrow asked 20/1, 2014 at 11:1

2

Solved

I am trying to achieve a borderless QLineEdit through CSS. It works fine when the QLineEdit is not in focus but when in focus the default blue border always comes up. The simple CSS I am using: QL...
Manyplies asked 11/11, 2012 at 1:30

2

I'm trying my hand at writing a sudoku solver, what I am currently trying to achieve is the input of a sudoku into a grid of 9 by 9 QLineEdit fields. The grid is constructed by using a grid of 9 Q...
Quintal asked 24/8, 2014 at 13:43

1

Solved

Say I have 10 names in a QListWidget (which is hidden) and an a QLineEdit. Now if I type the letter "a" in the line Edit it should display a drop down of all those name in the list widget that begi...
Foulup asked 16/6, 2014 at 16:54

1

Solved

I know that you can change the color of a line edit, so long as all the text is the same color, but is it possible to assign different colors to characters? That is, some characters are red, and so...
Neolith asked 4/6, 2014 at 9:4

4

Solved

I'm using Qt 5.2 and I would like to make a QLineEdit not editable. The problem with this is, that it doesn't appear like it. When using setReadOnly(true) it stays with white background and looks l...
Timtima asked 28/5, 2014 at 15:22

1

Solved

I'm new to Qt. I'm trying to implement a really simple calculator program. Just trying to put a button, and when its clicked, i want it to print "Hello, World!" to the next lineEdit. It is working ...
Neon asked 14/5, 2014 at 18:9

1

Solved

I want to be able to add a line of (grey) text that when you type in the line edit, goes away. So the text is not actually there, it is just displayed. For example: Before I type something, the g...
Diabolize asked 24/4, 2014 at 17:19

1

Solved

How can I get the text margins for a QLineEdit? Note the red lines in the screenshot, that's the margins I'm interested in: I tried qDebug() << ui->lineEdit->textMargins(); for the ...
Av asked 16/4, 2014 at 7:19

2

Solved

I have a bunch of QLineEdit boxes that I want to remove the borders from. Ideally I want to just do this with one line of code, rather than having to set no border for each QLineEdit box. I am tryi...
Ebneter asked 10/2, 2014 at 18:59

2

Solved

I have a program with two windows, main and the settings. When I run setText on a QLineEdit in the settings.py file, the new string is not in the GUI, and I can see the string before the setText co...
Portray asked 25/1, 2014 at 6:39

1

Solved

To bring the user's attention to the text field with an error (or if it is not filled) I colorize this QLineEdit) using: red = "QWidget { background-color:#8B0000;}" my_cool_QLineEdit.setStyleShee...
Mood asked 17/1, 2014 at 18:58

1

Solved

Sometimes I need to make multiple copies of code with incrementing numbers. In a form I'm coding, I need to make upwards of 12 checkboxes, each of which requires the following code: self.checkBox...
Aircrewman asked 21/2, 2013 at 19:37

2

Solved

I am attempting to reclaim some screen real estate in my application. I've got a search bar that is a basic QLineEdit and takes up space. In my menu bar, I easily have enough room to fit this searc...
Propjet asked 23/8, 2011 at 1:31

2

Solved

Is there a way to combine textChanged and editingFinished for QLineEdit? The problem is that editingFinished is emitted even if I only move the cursor away from QLineEdit without any changes. Where...
Smarm asked 29/8, 2012 at 16:8

1

Solved

I have created for my plugin a start GUI with 3 buttons. This works very well and if I click on one of the buttons a specific action is started. So far this works. If I click on one of the buttons ...
Fonz asked 29/8, 2012 at 16:3

1

How can I make a QLineEdit suitable for entering passwords (i.e. it doesn't show what's entered), something like the follwing:
Kelcie asked 29/4, 2011 at 16:1

3

Solved

I want to be able to know if in the QLineEdit it was a click. So I guess I should reimplement the following function(??): void QLineEdit::focusInEvent ( QFocusEvent * e ) [virtual protected] How...
Chink asked 10/6, 2010 at 7:13

2

I'm styling a QLineEdit to have rounded borders for use as a search box. The rounding of the borders themselves were easy, but I can't figure out for the life of me how to round the highlighted por...
Photokinesis asked 6/4, 2010 at 22:16

© 2022 - 2024 — McMap. All rights reserved.