View Full Version : regarding QApplication::focusWidget ()
sar_van81
21st December 2006, 07:19
hi...
can anyone say me what value will the following function return:
QApplication::focusWidget () .
or else how is it used...?
munna
21st December 2006, 07:40
From the docs
Returns the application widget that has the keyboard input focus, or 0 if no widget in this application has the focus.
Lets say you have an application which has 4 Input Boxes and you need to access the input box that currently has focus. You can use the above function for it.
I know it's a very bad example, but you get the idea, rite?;)
sar_van81
21st December 2006, 07:54
suppose if we have input boxes in some other application. can we use this function....?
munna
21st December 2006, 07:57
No you cannot.
sar_van81
21st December 2006, 08:22
will the following function work as it says "Returns the application widget that has the keyboard input focus, or 0 if no widget in this application has the focus":
QApplication::focusWidget ()
wysota
21st December 2006, 11:00
It means it will return a widget from YOUR application, not from ANY application. The last part of the sentence quoted suggests that as well.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.