Results 1 to 7 of 7

Thread: QLineEdit

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Oct 2007
    Posts
    78
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QLineEdit

    I don't think actual code will be of any value here so I will try quasi pseudo code in attempts to clarify the situation.

    I have a QLineEdit that transfers its text to a structure that is used to store the text in a file.

    It is transfered to the structure when the editingFinished() signal is emitted.

    Now in the QMainWindow I have a QAction (QToolBar and QMenu) so when I click on the "Save" QToolButton it does not cause the QLineEdit to lose focus (or finished the edit) so it saves the structure with the previous data. It never gets updated since editingFinished() never gets emitted.

    I am not sure how to go about making sure the QLineEdits most recent text is applied to the structure. In the QAction of the "save" button? In the QLineEdit (do not see what other signal could be valid)? Or some other QEvent processing that could force the editingFinished() signal.

    Bob

    EDIT: Ultimately clicking a QToolButton or a QMenu does not cause a QLineEdits editingFinished() signal to be emitted and thats the root of my problem.
    Last edited by coderbob; 27th February 2008 at 11:52.

Similar Threads

  1. QLineEdit and focus
    By serega in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2008, 00:49
  2. how to get last character of QLineEdit
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 16:38
  3. closeEditor() not always closing QLineEdit
    By mclark in forum Qt Programming
    Replies: 8
    Last Post: 27th November 2007, 01:44
  4. Problem Euro Sign with QLineEdit
    By Kubil in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2007, 04:56
  5. QValidator, regular expressions and QLineEdit
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 01:25

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
  •  
Qt is a trademark of The Qt Company.