Results 1 to 5 of 5

Thread: Problem with aboutToQuit().

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem with aboutToQuit().

    I have a problem with having an aboutToQuit() function.

    Qt Code:
    1. // THIS IS INT MAIN()'s end.
    2. int end = Qapp.exec();
    3. QObject::connect(&Qapp, SIGNAL(aboutToQuit()), qwCoreWindow, SLOT(almostQutting()));
    4. return end;
    5. }
    6. // declared thru CoreWindow as public slot
    7. void CoreWindow::almostQuitting(){
    8. QMessageBox QMB2(QMessageBox::NoIcon, "Help", "Saving to Registry "+
    9. QString("size h: %1").arg(size().height())+QString("pos.x: %1").arg((long)pos().x()), QMessageBox::Ok);
    10. switch (QMB2.exec()) {
    11. case QMessageBox::Ok:
    12. break;
    13. default:
    14. break;
    15. }
    16. CP.SaveDefaultSettings(size(), pos());
    17. }
    To copy to clipboard, switch view to plain text mode 

    I added the message box to see what changes. Because it wasn't saving the registry (SaveDefaultSettings).
    I wanted to see if it remembered the QSize and QPoint (position) of the main window which is CoreWindow...

    Any help is appreciated.
    Last edited by jacek; 26th March 2007 at 20:12. Reason: wrapped too long line

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.