Results 1 to 4 of 4

Thread: Window title bar and "X" button

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2007
    Posts
    23
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Window title bar and "X" button

    Quote Originally Posted by marcel View Post
    Although there's no direct way to tell that, you can use QEvent::spontaneous() to see if the event came from outside the app. Since the title bar is being managed by the platform window manager it seems logical that a QCloseEvent issued by pressing the close button will be spontaneous. If my assumption is true then you can figure out how to use the value of QEvent::spontaneous().
    You marcel are a genius. clicking the "X" returned true and a call to close() from the creating runtime returned false.

    I would never have tried to use that.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Window title bar and "X" button

    You marcel are a genius.
    Thanks, but I'm not, really...

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.