Results 1 to 2 of 2

Thread: QDialog, Mainwindow

  1. #1
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question QDialog, Mainwindow

    how can i disable the "x" button of the dialog or mainwindow??

    the root of my problem is when my app is still processing(loop) and the user click the "x" button it closes but it doesnt terminate the whole program the loop is still running..

    thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QDialog, Mainwindow

    Quote Originally Posted by triperzz View Post
    how can i disable the "x" button of the dialog or mainwindow??
    There is no cross-platform way to do that. However, you can do it with WinAPI, see this post.

    the root of my problem is when my app is still processing(loop) and the user click the "x" button it closes but it doesnt terminate the whole program the loop is still running..
    Instead of disabling the close button you could just ignore close event to prevent the dialog from closing.
    J-P Nurmi

Similar Threads

  1. Notifying Mainwindow of an event..
    By MrGarbage in forum Qt Programming
    Replies: 1
    Last Post: 9th November 2007, 22:29
  2. Replies: 1
    Last Post: 11th September 2007, 14:34
  3. Replies: 11
    Last Post: 31st May 2007, 02:11
  4. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 09:16
  5. Replies: 3
    Last Post: 23rd July 2006, 19:02

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.