Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. line edit

    Log in to post
    • All categories
    • D

      Solved converting from float or double to QString results in output being 0
      General and Desktop • c++ qstring conversion line edit float • • Dean21

      23
      0
      Votes
      23
      Posts
      526
      Views

      Kent-Dorfman

      @JonB said in converting from float or double to QString results in output being 0:

      Warning: The QString content may only contain valid numerical characters which includes the plus/minus sign, the character e used in scientific notation, and the decimal point. Including the unit or additional characters leads to a conversion error.

      In which case RTFM is the rule of the day! but I'm lazy.

    • tjktak1002

      Unsolved How to make lineEdit only accept string?
      General and Desktop • lineedit line edit qregularexpress • • tjktak1002

      7
      0
      Votes
      7
      Posts
      169
      Views

      tjktak1002

      @Christian-Ehrlicher oh ok haha :D Thanks for reminding me tho

    • L

      Solved Getting QStringList text to line edit based on a string inserted on another line edit
      General and Desktop • qtcreator qstringlist line edit indexof • • Lasith

      15
      0
      Votes
      15
      Posts
      3791
      Views

      Taz742

      @Lasith
      Your problems:

      You only once call the returning function of the index, and in the designer. (In fact, when ui->name text changes, the function should be called every time.)

      @Lasith said in Getting QStringList text to line edit based on a string inserted on another line edit:

      QString index;
      Name=ui->name->text();
      for(int i=0;i<names.size();i++)
      {
      if(names[i]==Name){
      index=i;
      }

      You want the string but in your cycle the 'i' of the integer. Why do not you pay attention to this(index = i)? Try compile the app? If yes, the compiler would inform you about it.

      From your profile it seems that you are using Qt too several months. But it does not seem to be at all.

      Do not try to conquer the peak, learn to walk first.

    • L

      Solved Using singals and slots in an efficient way
      General and Desktop • qtcreator line edit signals & slots directly • • Lasith

      4
      0
      Votes
      4
      Posts
      1021
      Views

      dream_captain

      @Lasith
      No, in this case use QSignalMapper.

    • L

      Unsolved Storing previously entered words in cache
      General and Desktop • qtcreator line edit username caching • • Lasith

      4
      0
      Votes
      4
      Posts
      847
      Views

      VRonin

      Store a QStringList in QSettings and pass it to a QStringListModel and then to the completer, maybe

    • L

      Solved Getting proper folder path
      General and Desktop • qt creator folder path button line edit • • Lasith

      5
      0
      Votes
      5
      Posts
      2295
      Views

      L

      @J.Hilk Thanx mate :) I had been too complex

    • L

      Unsolved Getting QLineedit values to qt header files
      General and Desktop • qtcreator header cpp qt line edit input • • Lasith

      7
      0
      Votes
      7
      Posts
      1486
      Views

      SGaist

      Hi,

      Your code won't work, your QSqlDatabase object is invalid.

      Please take the time to look at the code example in QSqlDatabase's documentation as well as the example provided.

      It' also discouraged to store database object like that locally. QSqlDatabase allows for easy connection handling without the need for these local copies.

    • Sh1gs

      Solved IP Editor Plugin key_tab issues
      General and Desktop • keypressevent keytab ip editor plugin line edit • • Sh1gs

      3
      0
      Votes
      3
      Posts
      1355
      Views

      Sh1gs

      Thank you @jsulm, I thought I read the documentation through, but apparently not. Also, I'm not calling QFrame. I saw the link I posted and used it as more of a guideline to create an IP Editor for my needs. Thank you for your help :)

    • Sh1gs

      Solved IP Address Editor with popup numberpad
      General and Desktop • ip address line edit widget touch screen • • Sh1gs

      6
      0
      Votes
      6
      Posts
      3148
      Views

      Sh1gs

      I am going to mark this topic as Solved. I used a lot of the methodologies from this topic. I used 4 lineedits because I'm building a plugin and I want the user to be able to enter each input mask individually.

    • Sh1gs

      Solved Stylesheets for widgets on a Dynamic GUI
      General and Desktop • textedit line edit widgets dynamic gui stylesheet • • Sh1gs

      12
      0
      Votes
      12
      Posts
      3753
      Views

      R

      Try this , where you create ur control "dynamically"

      QLineEdit * m_edit=new QLineEdit(this); m_edit->setStyleSheet(":focus{background:white}"); /*this should set the stylesheet*/
    • G

      Unsolved LineEdit style sheet
      General and Desktop • stylesheet line edit • • gabor53

      5
      0
      Votes
      5
      Posts
      9724
      Views

      S

      QLineEdit{ background-color:rgb(202, 255, 227);
      border: 2px solid gray;
      border-radius: 10px;
      padding: 0 8px;
      selection-background-color: darkgray;
      font-size: 16px;}
      QLineEdit:focus { background-color:rgb(192, 192, 255);}

      Try to add this to your lineedit in the Designer.

    • M4RZB4Ni

      Solved LineEdit .isEmpty() Problem
      General and Desktop • line edit empty problem qt 5.4.1 • • M4RZB4Ni

      4
      0
      Votes
      4
      Posts
      3803
      Views

      M4RZB4Ni

      @SGaist
      Thank You so much ,
      My problem solved! :)

    • D

      Unsolved Handling QInputMethodEvent
      General and Desktop • inputmethod japanese qt5.4 event line edit • • DivyPrakash

      1
      0
      Votes
      1
      Posts
      837
      Views

      No one has replied

    • lancelotrose

      Unsolved How do I connect to an event of line edit completion/exit and catch it in a QTreeView?
      General and Desktop • qlinedit tableview line edit event qtreeview • • lancelotrose

      6
      0
      Votes
      6
      Posts
      2375
      Views

      SGaist

      Sounds pretty crazy...

    • D

      Solved QDoubleValidate Switching
      General and Desktop • qvalidator switch switching line edit • • Dan90

      7
      0
      Votes
      7
      Posts
      1875
      Views

      D

      @kshegunov
      Allright, thanks for the help.

    • M

      Solved Are Widgets like LineEdit affected by scope ?
      General and Desktop • line edit scope • • mrmorph

      11
      0
      Votes
      11
      Posts
      2784
      Views

      SGaist

      Hi,

      Just a quick note, if your widget on stack (i.e. leDimWidth) gets a parent, you'll have a double delete problem since it will get destroyed when the parent is and again when your Stacker object gets destroyed.

    • S

      Unsolved how to enter a character to qlineEdits from pushButtons depending on the selected lineEdit
      General and Desktop • line edit push button • • Saad_Rafey

      2
      0
      Votes
      2
      Posts
      639
      Views

      mrjj

      Hi
      look at this sample
      http://www.java2s.com/Code/Cpp/Qt/Calculatorwithpushbuttons.htm
      Shows how to hook up buttons etc. (its numeric keypad)

      you can change it to use
      QApplication::focusWidget () const

      to input to whatever LineEdit that is selected.

    • E

      Unsolved QlineEdit with constant text and editable text fields
      General and Desktop • widget line edit qt 5.4.2 • • Embitel_qt

      13
      0
      Votes
      13
      Posts
      6637
      Views

      mrjj

      might be slightly more compact to use the fill method. :)

      http://doc.qt.io/qt-5/qstring.html#fill

    • Raim

      Push button clicked event executed simultaneously with returnedPressed() event of a LineEdit - *SOLVED*
      General and Desktop • push button line edit returnpressed clicked • • Raim

      1
      0
      Votes
      1
      Posts
      684
      Views

      No one has replied