[Qt-interest] Widget for real-time syntax error feedback ?

Stephen Collyer scollyer at netspinner.co.uk
Fri May 22 12:50:09 CEST 2009


I have a QLineEdit object in a modal dialog. In a slot connected to its
textChanged() signal, I want to provide real-time feedback of syntax errors
or of the entry of data that is illegal for that field.

I've tried using QDialog::setToolTip(), but this doesn't work well. (The
tool
tip isn't displayed immediately;l focus must leave and come back to the
widget
AFAICS). I've also tried using a QLabel, but I can't seem to make this
visible
at all (using QLabel::show() - something related to modality ?) .

So can anyone suggest an implementation of a widget:

a) that can be displayed from a slot of a modal dialog
b) whose the duration of display can be controlled easily (e.g. autohide
after X ms)
c) is visually suitable for displaying short-term textual feedback to a user
d) requires no interaction from the user (i.e. it's not like a
QErrorMessage)

I guess I'm looking for something similar to the QStatusBar::showMessage()
functionality, but in a standalone widget.

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090522/23c32080/attachment.html 


More information about the Qt-interest-old mailing list