July 26, 2010

CraigH CraigH
Lab Rat
6 posts

I-beam remnants in QLineEdit after clear() function

 

I am having problems with I-beam remnants in QLineEdit widgets. I have several QLineEdit’s in a main window. If they have any text in them when I use the clear() function (on each of them sequentially), I am left with an unblinking I-beam at the beginning of the box for each of them. One tip which I have already tried, is to sequentially setFocus through all of them. This worked for one program, but not for the current program. If I manually sequence through the widgets, the I-beam blinks, then disappears when moving on to the next one. This works for both tab and mouse use. Each LineEdit is part of a separate GroupBox, and the whole main window was made with Qt 4 Designer.
I am using Qt 4.6.2 under ubuntu 10.4.

Does anyone have a suggestion, or a permanent fix?

5 replies

July 31, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1274 posts

On win32, Qt 4.7beta2, the behavior I find is different. If I repeat the above steps, the I-beam vanishes from all QLineEdits. I did not setFocus on any particular QLineEdit, but sequentially cleared them

July 31, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1274 posts

Hey, just found that if I setFocus to any particular QLineEdit say ledit2, and then clear all of the QLineEdits, the focus still remains on ledit2. So no need for setFocus on each LineEdit. Hope this helps.

August 4, 2010

CraigH CraigH
Lab Rat
6 posts

It looks like this is a linux code bug. When I compile and run the same program under windows, it works fine, just like you say.

August 4, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1274 posts

then please do log a bug for this

August 7, 2010

CraigH CraigH
Lab Rat
6 posts

Bug report has been generated. Here is the link: http://bugreports.qt.nokia.com/browse/QTBUG-12737

 
  ‹‹ QXmlSchema not always working      Qt is crashing when showing this tooltip. Why? ››

You must log in to post a reply. Not a member yet? Register here!