Results 1 to 4 of 4

Thread: QLineEdit focus problem

  1. #1
    Join Date
    Jul 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QLineEdit focus problem

    Hi all,
    I have a problem with the focus for the widget QLineEdit.
    This is what append:
    I have a QMainWindow that show a QDialog that contains the QLineEdit widget.
    If I try to insert text i can not see any change on it, only when I pass the focus to an other control I can see what I have entered in the QLineEdit.
    I think that is a problem on the focus. I have tried to change the focus policy of the QLineEdit but the result is the same.

    This is the code that I use for show the QDialog

    Qt Code:
    1. void show_ControlPanel()
    2. {
    3. frm_ControlPanel *ControlPanel;
    4. ControlPanel = new frm_ControlPanel();
    5. ControlPanel->setModal(true);
    6. ControlPanel->show();
    7. }
    To copy to clipboard, switch view to plain text mode 
    How can I do for solve this problem?
    I use Qt Creator 1.2.0 on OSX

    Thanks in advance
    Last edited by jpn; 16th July 2009 at 17:14. Reason: missing [code] tags

  2. #2
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit focus problem

    Could you provide a (small) compilable source code that reproduce the problem?
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QLineEdit focus problem

    Finally I think that I have find where is the problem.
    In the QDialog there is a QListWidget, I have changed the focus Policy for this widget to "No focus" and I can edit the QlineEdit.

  4. #4
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit focus problem

    Next time give us a little bit more information, so we could help you. And please always use the code tags around your code.
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

Similar Threads

  1. Window focus issues (How to force focus to a window?)
    By montylee in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2009, 02:00
  2. Focus rect not drawing
    By draftpunk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2008, 16:21
  3. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 13:45
  4. Problem with receiving events from QDateEdit
    By gunhelstr in forum Qt Programming
    Replies: 4
    Last Post: 20th April 2006, 12:21
  5. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 22:36

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.