Results 1 to 8 of 8

Thread: Control name

  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Post Control name

    hi,
    I want to get the Object name of the control which has the current focus.
    How to do that?

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

  3. #3
    Join Date
    Feb 2008
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Post Re: Control name

    I need to use the object name which has current focus in a switch case.
    I tried in many ways to use it.But not getting it properly.
    Plz tell me how to use it.

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

    Default Re: Control name

    In C++ you cannot use strings in switch case statement. What are you trying to do in the first place?
    J-P Nurmi

  5. #5
    Join Date
    Feb 2008
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Control name

    Hi,
    Is there anything other than Object name to identify a control in qt.

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

    Default Re: Control name

    Could you answer my question? What are you trying to do?
    J-P Nurmi

  7. #7
    Join Date
    Feb 2008
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Control name

    I have a list of QLineEdit widgets.
    If i click and enter some data into a particular QLineEdit then some manipulations have to be done based on whichever control i click

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

    Default Re: Control name

    Quote Originally Posted by sonuani View Post
    I have a list of QLineEdit widgets.
    If i click and enter some data into a particular QLineEdit then some manipulations have to be done based on whichever control i click
    You have to help us to help you. "Some manipulation" doesn't tell too much. Anyway, have you noticed that QLineEdit supports QValidator?
    J-P Nurmi

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 20:43
  2. Text shifts when control appears...
    By MrGarbage in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2008, 04:12
  3. Version control - what to use?
    By TheKedge in forum General Programming
    Replies: 11
    Last Post: 4th March 2007, 09:49
  4. QTextEdit control
    By vijay anandh in forum Qt Programming
    Replies: 2
    Last Post: 31st May 2006, 14:14
  5. Replies: 6
    Last Post: 3rd February 2006, 10:48

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
  •  
Qt is a trademark of The Qt Company.