Results 1 to 2 of 2

Thread: Validator: force keeping cursor back in widget

  1. #1
    Join Date
    Jun 2009
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Validator: force keeping cursor back in widget

    Hi !

    Is it possible to implement the following requirement in a simple way:

    Exampe Window: QDialog (two QLineEdit and Ok/Close/Help QPushButton).

    As long as the input in the lineedit is not correct, and the user try to select
    e.g. the second lineedit or the Ok Button, an Error Message pops up and after
    closing the error box, the cursor is AGAIN in the same Label.
    But clicking Close of Help is allowed and possible.

    The same feature will be necessary for QTreeView and QTableView.

    Note: Please don't tell me this isn't a useful requirement (It's stupid, but I have to implement it EXACTLY in that way.)

    thanks,
    Bernd

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Validator: force keeping cursor back in widget

    I would really be annoyed when I was given such an application. How about instead disabling all other widgets so that this one is the only one you can interact with?

    BTW. There is always QWidget::setFocus().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. keeping a widget to be square
    By jmsbc in forum Qt Programming
    Replies: 5
    Last Post: 16th June 2009, 19:47
  3. Playbutton functionality
    By uchennaanyanwu in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2008, 22:29
  4. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  5. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35

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.