[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: save and restore the geometry of KMainWindow
From: Alexander Semke <alexander.semke () web ! de>
Date: 2018-01-30 20:06:02
Message-ID: eccf7002-c5d5-3c4a-e183-07d4e4232ff9 () web ! de
[Download RAW message or body]
On 30.01.2018 16:38, Milian Wolff wrote:
> This works for me:
> https://github.com/KDAB/hotspot/blob/4d1177d1631902dce1dd82f53553e97a7544b1fa/
> src/mainwindow.cpp#L162
Thanks, that helped. I was using
restoreGeometry(group.readEntry("geometry").toLatin1()) instead of
restoreGeometry(group.readEntry("geometry", QByteArray())) ... Hotspot
is a nice tool by the way :-)
Why not to add this logic to KMainWindow and to make this automatically
available for all/many KDE applications?
The state is already saved and restored there. Why not to do the same
for the geometry?
--
Alexander
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 30.01.2018 16:38, Milian Wolff
wrote:<br>
</div>
<blockquote type="cite" cite="mid:1814016.oAcv8L94oB@milian-kdab2">This
works for me:
<pre wrap="">
<a class="moz-txt-link-freetext" \
href="https://github.com/KDAB/hotspot/blob/4d1177d1631902dce1dd82f53553e97a7544b1fa/"> \
https://github.com/KDAB/hotspot/blob/4d1177d1631902dce1dd82f53553e97a7544b1fa/</a> \
src/mainwindow.cpp#L162</pre> </blockquote>
Thanks, that helped. I was using
restoreGeometry(group.readEntry("geometry").toLatin1()) instead of
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; \
-qt-user-state:3;">restoreGeometry(group.readEntry("geometry", QByteArray())) ... \
Hotspot is a nice tool by the way :-)</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:3;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:3;">Why not to add this logic to \
KMainWindow and to make this automatically available for all/many KDE \
applications?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:3;">The state \
is already saved and restored there. Why not to do the same for the geometry?</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:3;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:3;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:3;">Alexander </p>
<style type="text/css">
p, li { white-space: pre-wrap; }restoreGeometry(group.readEntry("geometry", \
QByteArray()));</style> <style type="text/css">
p, li { white-space: pre-wrap; restoreGeometry(group.readEntry("geometry", \
QByteArray()))</style><br> </body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic