Results 1 to 3 of 3

Thread: SetReadonly and TAB

  1. #1
    Join Date
    Sep 2011
    Posts
    51
    Thanks
    2
    Qt products
    Qt4

    Default SetReadonly and TAB

    Good morning,
    i made a simple map with a button and 2 textedit fields.
    The first enable and the second disabled.

    Using code i enable the other field when click the button

    ui.edtText1->setReadOnly(false);
    ui.edtText1->setFocus();

    All works and i can write in that field. The cursor when i click the button is set on the field previously disabled.

    Problem is that using the TAB key to navigate the 2 fields, the cursor doesen't set on the field enabled by code.
    I try to click on the enabled field and the cursor doesen't set on the field at all.
    It works only when i click the button.
    Why this ?

    Thanks Gabriele
    Last edited by gab74; 22nd November 2011 at 16:51.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: SetReadonly and TAB

    I don't know. Perhaps it misses some kind of initialisation, being read-only. I would try creating the field as not read-only and turn it into read-only as late as possible and see what happens.

  3. #3
    Join Date
    Sep 2011
    Posts
    51
    Thanks
    2
    Qt products
    Qt4

    Default Re: SetReadonly and TAB

    Yes, i will try in this way...
    Thanks...

Tags for this Thread

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.