PDA

View Full Version : How to make QTimeEdit Box readable only



Krishnacins
6th March 2006, 06:31
Hi Sir,

i want to make QTimeEdit in read only mood.
means if i want change any value (Hour, Minute, Second) in QTimeEdit through mouse or keyboard then value will nt get changed & if i want to change the value of Hour or minute or second throght function then value of any one gets changed.

Please help me

Thanks & Regards
krishna

sunil.thaha
6th March 2006, 06:47
use
timeEdit->setEnabled( false );

jpn
6th March 2006, 06:56
use
timeEdit->setEnabled( false );
That would prevent any user interaction with the time edit (eg. copying the time..)

This is just a guess, but maybe you could try disabling the input methods:
void setInputMethodEnabled ( bool b ) (http://doc.trolltech.com/3.3/qwidget.html#setInputMethodEnabled)

Krishnacins
6th March 2006, 08:10
Thanks a lot.

Thanks & Regards
Krishna