Results 1 to 2 of 2

Thread: QLineEdit cursor lost when switching between layouts

  1. #1
    Join Date
    Apr 2011
    Location
    Bayreuth, Bayern
    Posts
    24
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default QLineEdit cursor lost when switching between layouts

    Hello!

    Programming with Qt 4.7.0 under Windows, I came across a very strange problem that i cannot solve. The code has now grown so big, that i cannot find the guilty excerpt to upload it here.

    In my program, I allow the user to work with "projects". Each project consists of a few stages (compare to Adobe Lightroom, e.g.). I emulate switching between stages by changing program layout each times a user chages current stage. To the left of the program QMainWindow is the panel with stage buttons, to the right - the corresponding stage layout.

    At the beginning everything works just fine. Now, when i switch between stages 2 and 1 qlineedits lose focus (?) and i cannot click them with my mouse any more. I can, however, access these QLineEdits with the TAB-key. The problem seems to be in that layout of stage 1 loses track of mouse cursor.

    Does anybody have an idea what could be wrong?

    Thank you!

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit cursor lost when switching between layouts

    Hello!

    I'm afraid too big is not an option. You will have to do better than that and track your problem.

    I would suggest, to temporarily put ALL your signal connections into comments and see if the problem still persists.

    And rebuild your project and run qmake.

    Good luck!

    Johannes

Similar Threads

  1. set cursor position in qlineedit with an inputmask
    By guitar1 in forum Qt Programming
    Replies: 2
    Last Post: 11th March 2011, 17:13
  2. Replies: 1
    Last Post: 29th November 2010, 11:08
  3. Replies: 2
    Last Post: 25th November 2010, 09:53
  4. QLineEdit keep cursor active.
    By bunjee in forum Qt Programming
    Replies: 10
    Last Post: 2nd September 2009, 14:50
  5. QLineEdit lost focus
    By codebehind in forum Newbie
    Replies: 5
    Last Post: 4th May 2007, 16:02

Tags for this Thread

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.