Results 1 to 7 of 7

Thread: Dialog closes on pressing Esc key?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    72
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    3
    Thanked 4 Times in 4 Posts

    Default Re: Dialog closes on pressing Esc key?

    Simply set its window Flag Qt::Window, I hope it help you,
    you can also prevent your escape key event by explicitly change its event using keyPressEevnt(QKeyEvent *event).........

  2. #2
    Join Date
    Dec 2006
    Posts
    211
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    27

    Default Re: Dialog closes on pressing Esc key?

    Thanks for the reply.

    Actually it does not make any difference when I use Qt::Windows flag but I will try out second method of changing the keyPressEvent.

  3. #3
    Join Date
    Dec 2006
    Posts
    211
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    27

    Default Re: Dialog closes on pressing Esc key?

    Yes the key event method does work.
    Thanks.

  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: Dialog closes on pressing Esc key?

    J-P Nurmi

Similar Threads

  1. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 10:41
  2. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  3. Dialog closes immediately
    By bruccutler in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2007, 23:18
  4. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52
  5. QLineedit::returnPressed() closes dialog?
    By geranol in forum Newbie
    Replies: 2
    Last Post: 6th January 2006, 10:18

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.