Results 1 to 2 of 2

Thread: override close button

  1. #1
    Join Date
    Jul 2012
    Posts
    10
    Thanks
    5
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default override close button

    Hi -

    I am using mdiarea and qmdisubwindows for my application. My question is - I want to override the function called whenever the "X" in the title bar is clicked.

    I tried overloading QWidget::close() but no luck.

    Any help appreciated.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: override close button

    QWidget::close() is not a virtual method. Try reimplementing QWidget::closeEvent();

  3. The following user says thank you to stampede for this useful post:

    yapatel (5th July 2014)

Similar Threads

  1. Replies: 2
    Last Post: 6th May 2011, 08:02
  2. Replies: 2
    Last Post: 26th April 2011, 11:44
  3. Close Button
    By Lycus HackerEmo in forum Newbie
    Replies: 4
    Last Post: 30th December 2009, 05:27
  4. A close button in QMenuBar
    By edgard26 in forum Qt Programming
    Replies: 3
    Last Post: 5th June 2009, 09:43
  5. Close button in a tab
    By mitro in forum Newbie
    Replies: 2
    Last Post: 16th May 2008, 10:22

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.