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

Malyushytsky, Alex alex at wai.com
Sun Mar 22 08:41:31 CET 2009


First, I would appreciate if you reply to the mailing list only.

As I already mentioned I don’t see a way to implement general approach.
If I were you I would implement recognizion  as much standard widgets as I could.
Would certainly provide easy and fast manual access to the onscreen keyboard.
In addition you can make yor keyboard smart. For example it can remember list of the widgets user was requesting it for and update database of such widgets.

Regards,
  Alex

________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of marslee_suc
Sent: Saturday, March 21, 2009 10:48 AM
To: Andreas Pakulat
Cc: Qt-interest at trolltech.com
Subject: Re: [Qt-interest] how I can know the widget is editable?

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


________________________________
网易邮箱,中国第一大电子邮件服务商<http://www.yeah.net>


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”

“Please consider our environment before printing this email.”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090322/7b854535/attachment.html 


More information about the Qt-interest-old mailing list