Results 1 to 3 of 3

Thread: Problem regarding GUI application

  1. #1
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Problem regarding GUI application

    Hi ,I am using QT4 on windowsXP. I developed a QT GUI application using QMainWindow as main class.Now my problem is ,if I close the window by clicking on close button of window(which is on top most right corner of window) I need to ask wether to close the application or not .if YES then it have to be close or if NO the application should not be close.So suggest me to do this.
    So please help me to solve this problem.

    With regards ,
    Sudheer.

  2. #2
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem regarding GUI application

    You can reimplement closeEvent of QWidget.

    Qt Code:
    1. void QWidget::closeEvent ( QCloseEvent * e ) [virtual protected]
    To copy to clipboard, switch view to plain text mode 

    Example is here: _https://cgs.hpi.uni-potsdam.de/doxygen/qt/qaction-application-example.html#x1173

  3. #3
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Problem regarding GUI application

    Thanks a lot for your kind reply.

    with regards
    sudheer

Similar Threads

  1. Problem with closing the application
    By macbeth in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2008, 15:02
  2. Qt application size problem : it is very big
    By mourad in forum Qt Programming
    Replies: 3
    Last Post: 15th May 2008, 16:55
  3. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  4. Weird problem while porting from Qt3 to Qt4
    By vermarajeev in forum Qt Programming
    Replies: 4
    Last Post: 8th August 2007, 07:51
  5. GPRA application problem?
    By mellibra in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th December 2006, 06:37

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.