Results 1 to 3 of 3

Thread: help with QLineEdit

  1. #1
    Join Date
    Feb 2010
    Posts
    12
    Qt products
    Qt4 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default help with QLineEdit

    I'm a true newbie 6 days in....

    I'm written my first app using python and qt designer. All has gone well except for one little problem, I can't seem to retrieve in puts from a QLineEditer wedget.

    the code I tryed to use for this was

    intext = self.ui.linetext.text() (linetext being the name of the QLineEditer)

    When this is run intext is given the value of fasle, as well as, what ever is in the box is replaced with 'fasle'
    this happens when the user enters a value into the box, however if I add this line

    self.ui.linetext.setText('1')

    and have the app enter the info into the box the above line seems to read it just fine.

    what am I doing wrong...?

    thanks for any help

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: help with QLineEdit

    can you provide a minimal compilable program reproducing the problem

  3. #3
    Join Date
    Feb 2010
    Posts
    12
    Qt products
    Qt4 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default Re: help with QLineEdit

    Hi and thanks

    Thanks for your post believe it or not you help me fix my problem. Your request for a simple example of the program was what did it. I sat down and wrote one, and to my surprise it worked just as it should. It was then obvious even to me that the problem was not with that part of the program but somewhere else.

    It took a little time but I found it, a line I had put in another part of my program while playing with some ideas. I thought I had removed it, but I guess not...

    well thanks again ...

Similar Threads

  1. QLineEdit
    By bismitapadhy in forum Qt Programming
    Replies: 3
    Last Post: 11th August 2009, 08:24
  2. QLineEdit
    By GuL in forum Newbie
    Replies: 3
    Last Post: 19th August 2008, 17:54
  3. QLineEdit
    By rick_st3 in forum Newbie
    Replies: 1
    Last Post: 14th June 2008, 09:05
  4. QLineEdit
    By sonuani in forum Qt Programming
    Replies: 3
    Last Post: 19th February 2008, 11:40
  5. About QLineEdit
    By vijay anandh in forum Newbie
    Replies: 2
    Last Post: 19th October 2006, 10:45

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.