[Qt-interest] QWidget::setDisabled()

Dirk Neumann dirk.neumann at dn-informatik.de
Fri Jul 30 12:20:14 CEST 2010


On Fri, 30 Jul 2010 13:25:11 +0400
Denis Akhmetzyanov <dakhmetzyanov at smartlabs.tv> wrote:

> Hi,
> You could create helper widget "grabber" and call for it:
> void QWidget::grabKeyboard()
> http://doc.qt.nokia.com/4.6/qwidget.html#grabKeyboard
> void QWidget::grabMouse() http://doc.qt.nokia.com/4.6/qwidget.html#grabMouse
> <http://doc.qt.nokia.com/4.6/qwidget.html#grabMouse>Then other widgets get
> no keyboard or mouse events at all until QWidget::releaseKeyboard() and
> QWidget::releaseMouse() are called.

And, depending on platform, no other application gets mouse and
keyboard input, so be careful.

Dirk.



More information about the Qt-interest-old mailing list