[Qt-interest] how I can know the widget is editable?

marslee_suc marslee_suc at 163.com
Sat Mar 21 18:48:10 CET 2009


Thank you for your reply, I am working on a onscreen keyboard. I want the 
keyboard can show itself automatically. now I developed a plugin using
 QInputContext class , because I found this class has a virtual function called 
setFocusWidget it can get a QWidget pointer pointing to current focused widget. 
but the focused widget may be not an editable widget, so I think I should know that.
If the widget is an editable widget it can call a DBus method to show the virtual key
board. Do you have other idea to do this? 
BR,
Edward.




在2009-03-20,"Andreas Pakulat" <apaku at gmx.de> :
>On 20.03.09 13:40:28, marslee_suc wrote:
>> Thank you , I use the way you mentioned, but In this way I should know the className, If I don't know class name can I do 
>> that? for example if you get a QWidget pointer points to Kate edit field I found it is not class inherits QLineEdit, QTextEdit  
>> etc. It use itself class.
>
>No you can't, there's no property on QWidget that would tell you wether it
>implements an editable widget or one that just displays information.
>
>Can you explain why you don't have access to the actual widget (instead of
>just a QWidget pointer) and why you need to know that it is editable? Maybe
>there's another way to achieve what you want.
>
>Andreas
> 
>-- 
>You have an unusual equipment for success.  Be sure to use it properly.
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at trolltech.com
>http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090322/a4217825/attachment.html 


More information about the Qt-interest-old mailing list