View Full Version : QLineEdit cursor lost when switching between layouts

6th April 2011, 13:39

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!

6th April 2011, 13:48

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!