Results 1 to 2 of 2

Thread: QLineEdit

  1. #1
    Join Date
    Jun 2008
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default QLineEdit

    How do I take number inputs from QLineEdit ? Say,if I wanted to multiply 2 numbers taking the two numbers from two different QLineEdit and display the result in a third QLineEdit.
    And how would I link another program which performs the calculations with QLineEdit , both for taking inputs from QLineEdits and displaying the result in another one ? And also can I imply certain restriction on the value being entered ? Say,I wanted the QLineEdit to take only float values. How do I do it..??

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLineEdit

    QLineEdit::text(), QString::toInt(), QDoubleValidator or simply use QDoubleSpinBox instead of the line edit.

Similar Threads

  1. Pointer Question related to QLineEdit
    By ChrisReath in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 16:13
  2. how to get last character of QLineEdit
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 17:38
  3. Problem Euro Sign with QLineEdit
    By Kubil in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2007, 05:56
  4. QValidator, regular expressions and QLineEdit
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 02:25
  5. a box around QLineEdit?
    By GreyGeek in forum Qt Tools
    Replies: 13
    Last Post: 8th February 2006, 16:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.