Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. qlineedit
    Log in to post

    • UNSOLVED QLineEdit is overwriting the first input character (bug?)
      Mobile and Embedded • android widget qlineedit bug • • Hector_WPG  

      3
      0
      Votes
      3
      Posts
      32
      Views

      @jsulm That is correct, but I'd first try with the latest Qt 5 version 5.15.2 Regards
    • UNSOLVED Can't use on-screen keyboard on tvOS
      Mobile and Embedded • c++ qlineedit keyboard tvos appletv • • dbaldassi  

      1
      0
      Votes
      1
      Posts
      39
      Views

      No one has replied

    • UNSOLVED How to populate values in my Qdialogbox's linedits?
      General and Desktop • c++ qt 5.4 qmainwindow qdialog qlineedit • • learnist  

      6
      0
      Votes
      6
      Posts
      36
      Views

      Hi, exec is a blocking call so basically you modify your dialog content after you dismiss it.
    • SOLVED QLineEdit Selection changed()
      General and Desktop • qlineedit qmouseevent qt for windows • • Andrex_Qt  

      3
      0
      Votes
      3
      Posts
      77
      Views

      Thanks for the insight, still my issue was that you have to double click (mouse or touch) the LineEdit to get its selection. Now in place of LineEdit i have used TextEdit, it works on single click. Thanks again for the reply.
    • SOLVED Pass value to Dialog/set Values
      General and Desktop • qdialog qlineedit pass value • • nicmorais  

      7
      0
      Votes
      7
      Posts
      73
      Views

      Wow! Thank you @JonB, this solved my issue. One more solved topic to the forum. Have a nice a nice day!
    • SOLVED Problem overriding mousePressEvent
      General and Desktop • c++ qlineedit qt 5.9.5 • • Daniel_Contro  

      6
      1
      Votes
      6
      Posts
      58
      Views

      @Daniel_Contro hi Good to hear. best to set this as solved and make a new one as then its easier for others to search :)
    • SOLVED Potential Bug (Qt 5.15): QLineEdit emits "editingFinished()" signal twice when the text is changed and enter is pressed
      General and Desktop • signal qlineedit emit signal • • oblivioncth  

      13
      0
      Votes
      13
      Posts
      388
      Views

      My behavior correction patch for this one has also gone through to be available in 6.0/the current dev build https://codereview.qt-project.org/c/qt/qtbase/+/312083 Cheers.
    • UNSOLVED Styling of QLineEdit/QListView child of QCombobox on hover
      General and Desktop • qcombobox qlineedit qss • • mikael.larsson  

      3
      0
      Votes
      3
      Posts
      112
      Views

      @mikael-larsson Hi You could try an event filter on the Combobox and call the code for hover effect but if your effect is purely stylesheet based then i think you then must send it fake hover event to trigger it or something like that. You might also be able to subclass the combo and rig the paintEvent with if (someflag) option.state |= QStyle::State_MouseOver; to trigger hover on command from the event filter/ or combo hover or how you plan to trigger it.
    • SOLVED how to capture a mouse leave event only on a specific QWidget ( a QlineEdit ) ?
      General and Desktop • qlineedit qmouseevent • • Lemat  

      6
      0
      Votes
      6
      Posts
      169
      Views

      @Alain38-0 okay, i will use it for another project. thanks.
    • SOLVED Add TreeWidget item from another dialog
      General and Desktop • qmainwindow qdialog qlineedit qtreewidget • • HenrikSt.  

      3
      0
      Votes
      3
      Posts
      342
      Views

      Thanks, mrjj! That's it! Merry christmas
    • SOLVED QLineEdit: clear mask when not editing
      General and Desktop • qlineedit mask • • Justin Iurman  

      5
      0
      Votes
      5
      Posts
      609
      Views

      @mrjj Thanks for the welcoming :-) Indeed, the QStyledItemDelegate works fine, but only when I use a QTableWidget. So a first solution was to create a QTableWidget with 1 row and 1 column, and insert my delegate inside. The problem with this technique is that it's hard to perfectly mimic a QLineEdit (behavior, style, etc). For instance, with a QTableWidget, there is no simple click on items to enter in edit mode (this is a double click, at least), as far as I know. It's still possible to redefine the behavior, I guess, but it's not worth it. I don't like the whole thing. That's why I came up with another idea. This time, I keep my QLineEdit as is, and I add/remove the input mask when having/losing focus. Thanks to that, I'm now able to see the "true" text (without mask format) when I'm not editing it (QLineEdit does not have the focus), while I can see the text (with mask format) when I'm editing it (has focus). I know it's not totally elegant, but I don't think there is an elegant solution at all for this "problem". For those interested, a quick example on how to achieve this: (1) install an event filter (installEventFilter()) on the QLineEdit (2) filter on focus in/out (2.1) focus in: add the mask (setInputMask()) (2.1) focus out: remove the mask and set the text to the value before the mask was removed (because removing the mask erases the text inside the QLineEdit)
    • SOLVED Signal and slot wrong value being sent
      General and Desktop • qtcreator signal & slot button qlineedit • • Lasith  

      5
      0
      Votes
      5
      Posts
      1425
      Views

      Hi Yes calling the function directly is actually a better solution in this case. Its worth mentioning that the so called slots are 100% normal c++ member functions and can be called without any Qt involvement/use of. void MainWindow::on_pushButton_clicked() { int value=ui->lineEdit->text().toInt(); // get value Dialog dialog1; dialog1.sendIntData(value); dialog1.exec(); }
    • SOLVED Multiple LineEdits focus issues
      General and Desktop • qlineedit focus focus issue customplugin ip editor • • Sh1gs  

      7
      0
      Votes
      7
      Posts
      2247
      Views

      Thanks for posting your solution. Happy coding.
    • UNSOLVED How to make lineEdit acceptable only integers?
      General and Desktop • qlineedit qtdesigner input • • testerius  

      7
      0
      Votes
      7
      Posts
      14365
      Views

      Hi, for an integer input between 0 and 100 set the mask to "009". Thats all.
    • UNSOLVED Connect slider and line edit??
      General and Desktop • qlineedit connect qslider shared value • • QT-static-prgm  

      11
      0
      Votes
      11
      Posts
      5690
      Views

      But why use QLineEdit if you are only manipulating numbers ? That makes the code uselessly complicated.
    • SOLVED QLineEdit using a QRegExpValidator doesn't take effect.
      General and Desktop • qlineedit qregexp qregexpvalidato • • Cysis145  

      5
      0
      Votes
      5
      Posts
      1431
      Views

      QRegularExpression rx("[A-Za-z0-9]*"); QRegularExpressionalidator *v = new QRegularExpressionValidator(rx, this); ui->LE_ObjectName->setValidator(v);
    • How to check if email entered exists or not in QLineEdit ?
      General and Desktop • qlineedit qt5.7.0 • • Ahti  

      9
      0
      Votes
      9
      Posts
      2298
      Views

      There are a number of sites providing this service, most of them commercially. http://verify-email.org/ has a free API limited to 5 checks an hour. https://emailhunter.co/ limits to 150 a month
    • UNSOLVED How to get characters which user is typing in QLineEdit ?
      General and Desktop • qlineedit qt5.7 • • Ahti  

      16
      0
      Votes
      16
      Posts
      4363
      Views

      @JonB Sure. I will change the code as you said. Thank you so much.
    • UNSOLVED Values of dynamically created QLineEdit
      General and Desktop • qlineedit qlayout • • Tirolel  

      4
      0
      Votes
      4
      Posts
      1391
      Views

      @Tirolel If you want t do it that way you shouldn't you cast the widget to find out what type it is before you actually use it? if(qobject_cast<QLineEdit*>(pLine->widget()) != 0) ... Test for which type it is then use the correct type cast to use the actual member functions...
    • UNSOLVED Qt does not read the keyboard correctly
      QtonPi • qt5.6 qlineedit • • Munke  

      2
      0
      Votes
      2
      Posts
      833
      Views

      Hi and welcome to devnet, Looks like the keyboard layout of your Pi doesn't match the keyboard layout of your desktop computer. Which are both ?
    • SOLVED TextChanged variable unreachable ?
      General and Desktop • qstring qlineedit variable qlinedit • • cxam  

      3
      0
      Votes
      3
      Posts
      908
      Views

      @mrjj Thanks Mrjj :) it went perfect, you're awesome haha ;)
    • SOLVED QLineEdit
      General and Desktop • qlineedit focus issue • • gabor53  

      9
      0
      Votes
      9
      Posts
      3119
      Views

      Thank you it worked.
    • UNSOLVED StyleSheet to change QLineEdit background while being edited
      General and Desktop • stylesheet qlineedit • • shavera  

      4
      0
      Votes
      4
      Posts
      2631
      Views

      @shavera Did you tried to call QWidget::Update() after modifing your whileEditing property ?
    • SOLVED How to prohibit user from changing the cursor position in QLineEdit in touch based user interface
      Mobile and Embedded • qlineedit • • Sidii  

      3
      0
      Votes
      3
      Posts
      898
      Views

      Dear @SGaist, Thanks for the reply. Actually i do not want user to change the cursor position. I got one work around. I have connected the cursor position changed signal to one slot which automatically sets the cursor position to the end. The slot first calculate the text length and then moves the cursor to the last position. So in this case even if user tries to change the cursor location, cursor automatically comes at the end and whatever the user types is appended to the end. Regards Sid
    • Display 1 as 01, 2 as 02, 3 as 03, 4 as 04, 5 as 05, upto 9 as 09 in QLine Edit
      Mobile and Embedded • qlineedit • • Sidii  

      3
      0
      Votes
      3
      Posts
      739
      Views

      Hi, Since those are only numbers, why not use QSpinBox ?
    • UNSOLVED QLineEdit completion box direction
      General and Desktop • qlineedit completion box • • Kaluss  

      15
      0
      Votes
      15
      Posts
      2847
      Views

      How small are we talking about ? Note that if you mix that keyboard with Qt's input framework, you're probably going to have another problem when the keyboard's line edit gets the focus.
    • Can't enter apple symbol () in QLineEdit and QTextEdit on OSX
      General and Desktop • qlineedit qtextedit osx apple symbol • • peniwize  

      2
      0
      Votes
      2
      Posts
      975
      Views

      Dear @peniwize, I am not aware of direct entry of special symbols in QLineEdit in MAC but in WINDOWS OS we can do with the help of ALT key and the symbol code. Basically go to Character Map and select the special symbol then you will be able to see the corresponding Key code to that special character. Just hold ALT symbol and enter the code from num pad by enabling NUM LOCK. Then release the ALT key. That special symbol will automatically appear in the QLineEdit in Windows. May be something similar you can try in MAC OS too. Good luck!!
    • SOLVED setting QLineEdit text bold
      General and Desktop • qlineedit bold • • vinothrajendran4  

      8
      0
      Votes
      8
      Posts
      3412
      Views

      @vinothrajendran4 that said, i did find some code on the new that uses a trick. please see this sample https://www.dropbox.com/s/m6slequi83tbqg2/linedit.zip?dl=0
    • UNSOLVED Selective keyPressEvent, filter for dedicated sender QLineEdit
      General and Desktop • qlineedit qkeyevent qkeypressevent • • Ralf  

      2
      0
      Votes
      2
      Posts
      1022
      Views

      You need to accept the event so the parent knows that the event has been handled. Otherwise the event will go all children until someone accepts it or if none do, it will be ignored. so keyEv->accept() should do the trick.
    • [Solved]Hiding default value of QLineEdit
      General and Desktop • qlineedit hide • • Yatshan  

      2
      0
      Votes
      2
      Posts
      1261
      Views

      From the documentation for placeholderText : QString: "This property holds the line edit's placeholder text. Setting this property makes the line edit display a grayed-out placeholder text as long as the line edit is empty." So, setting the text means the place holder text isn't shown any more. You can check whether the value is empty before you use it. If it is empty you use your default value.
    • Search up/down using QsciScintilla
      General and Desktop • windows qlineedit search qsciscintilla • • Yatshan  

      3
      0
      Votes
      3
      Posts
      1154
      Views

      @Yatshan said in Search up/down using QsciScintilla: m_pTextEdit->SendScintilla(QsciScintilla::SCI_INDICATORCLEARRANGE, 0, data.length()); This really helped me with clearing all the highlights! I tried QsciScintilla::SCI_MARKERDELETEALL for many times but no luck. Thanks!
    • Weird behaviour of QLineEdit
      Mobile and Embedded • qlineedit keypressevent mousepressevent • • Sidii  

      1
      0
      Votes
      1
      Posts
      401
      Views

      No one has replied

    • qt why qlineedit hidden after resize?
      General and Desktop • qlistwidget qlineedit • • deynekoaa  

      2
      0
      Votes
      2
      Posts
      1228
      Views

      Hi, Just a wild guess but you might be resizing it to 0
    • Set password character QLineEdit
      Mobile and Embedded • linux qlineedit password • • kumararajas  

      3
      0
      Votes
      3
      Posts
      1868
      Views

      @SGaist Thanks for your quick answer. And sorry for the delayed reply. Overriding QLineEdit was in my mind. Wanted to know if there are any straight forward way to get it done. But now am sure about that! Thank you!
    • [SOLVED] QLineEdit, setNum(), How to show more than 6 decimal places of a number?
      General and Desktop • qlineedit • • newe12  

      5
      0
      Votes
      5
      Posts
      8513
      Views

      Solved! It is working now! I had set: lineedit->setMaxLength(10); before. This has been limiting: ...,'g', 10)); After I have removed it, it works! @Chris-Kawa thanks for the other post, but 'g', 10 works fine now! Thanks anyway!
    • [SOLVED] QLineEdit does not receive character input on Android
      Mobile and Embedded • android qlineedit keyboard • • SteveMBay  

      30
      0
      Votes
      30
      Posts
      9932
      Views

      a solution i found is to remove only the Qt::Sheet flag and you can let the other Qt::FramelessWindowHint and Qt::Popup with no problem