D13808: Fix KMainWindow saving incorrect widget settings

Mladen Milinkovic noreply at phabricator.kde.org
Wed Jul 4 05:57:01 BST 2018


maxrd2 added a comment.


  Thank you! QEventLoop and creating window with new operator did it. Now the only problem is that no matter how i close the window from code it's not reproducing behavior. Only closing the window manually through window manager works.
  Have tried:
  QApplication::postEvent(mw, new QCloseEvent); // this one does absolutely nothing
  QApplication::postEvent(mw, new QDeferredDeleteEvent);
  QTimer::singleShot(1000, [&](){ QApplication::sendEvent(mw, new QDeferredDeleteEvent); });
  mv.close();
  QTimer::singleShot(1000, [&](){ mv.close(); });
  
  The close event from window manager is QDeferredDeleteEvent and has spontaneous flag, i didn't notice any other differences in debugger. Any ideas?

REPOSITORY
  R263 KXmlGui

BRANCH
  fix-window-state-save

REVISION DETAIL
  https://phabricator.kde.org/D13808

To: maxrd2, #kde_applications, dfaure, elvisangelaccio, broulik, cfeck
Cc: wbauer, aacid, ngraham, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180704/2bffc868/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list