[Bug 117900] JJ: KJobViever doesn´t remember window position

Konstantin konst.heil at stud.uni-heidelberg.de
Tue Sep 4 13:17:54 CEST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=117900         




------- Additional Comments From konst.heil stud uni-heidelberg de  2007-09-04 13:17 -------
Hello,

it shouldn't be hard to implement this feature. Just add the functions to the MainWindow, if there aren't allready some.
void writeSettings()
{
  QSettings settings("Organization", "application");
  settings.setValue("geometry", geometry());
}
void readSettings()
{
  QSettings settings("Organization", "application");
  QRect rect = settings.value("geometry").toRect();
  setGeometry(rect);
}

and call readSettings in the constructor of the MainWindow after setupUi
and writeSettings in the closeEvent(QCloseEvent *event) before accepting the event.

Kind Regards


More information about the Kde-print-devel mailing list