Results 1 to 4 of 4

Thread: How to make QTimeEdit Box readable only

  1. #1
    Join Date
    Mar 2006
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default How to make QTimeEdit Box readable only

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make QTimeEdit Box readable only

    use
    timeEdit->setEnabled( false );
    We can't solve problems by using the same kind of thinking we used when we created them

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to make QTimeEdit Box readable only

    Quote Originally Posted by sunil.thaha
    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 )

  4. The following user says thank you to jpn for this useful post:

    sunil.thaha (6th March 2006)

  5. #4
    Join Date
    Mar 2006
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: How to make QTimeEdit Box readable only

    Thanks a lot.

    Thanks & Regards
    Krishna

Similar Threads

  1. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.