Qt-jambi-interest Archive, November 2007
widget determine that it runs under the qt-designer
Message 1 in thread
How can a widget determine that it runs under the QT-Designer?
regards
Dani
Message 2 in thread
Daniel Sigg wrote:
> How can a widget determine that it runs under the QT-Designer?
Hi Daniel,
You mean as a custom widget? There is no way for a widget to know that.
If you want to do something really nasty you could check the parent
chain of the widget and see if you find widgets with "designer" in their
objectName(), but there is no guarantee that this will work.
What are trying to acheive here?
-
Gunnar
Message 3 in thread
Yes, a custom widget.
The Widget grab the keyboard input with grabKeyboard().
But during the Design time this leads to the fact that the property editor
does not receive any keyboard events.
Dani
Gunnar Sletta wrote:
> Daniel Sigg wrote:
>> How can a widget determine that it runs under the QT-Designer?
>
> Hi Daniel,
>
> You mean as a custom widget? There is no way for a widget to know that.
>
> If you want to do something really nasty you could check the parent
> chain of the widget and see if you find widgets with "designer" in their
> objectName(), but there is no guarantee that this will work.
>
> What are trying to acheive here?
>
> -
> Gunnar