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

Malyushytsky, Alex alex at wai.com
Fri Mar 20 05:32:53 CET 2009


Use bool QObject::inherits ( const char * className ) to find if your widget is derived frome one of the types you know how to deal with: QLineEdit, QTextEdit, etc. If it is , you can cast pointer to specific type and then check if it is editable ( for example isReadOnly () for QlineEdit )

Regards,
   Alex

________________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of marslee_suc
Sent: Thursday, March 19, 2009 8:31 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] how I can know the widget is editable?

Hi all,

I am facing a big problem :how can I know a widget is editable. I get a pointer that point to  QWidget. I want to know
whether the widget is an input widget such I can input some thing by keyboard .


Thank you in advance


________________________________________
网易邮箱,中国第一大电子邮件服务商


---------------------------------------------------------------------------------------------------
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.”




More information about the Qt-interest-old mailing list