<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Detlev,<br>
<br>
We have of the order 60-70 interface plugins available in our
'tool box' - to be able to order them, group them, filter/search
them - and still maintain a compact layout - I felt that the
QToolBox offered too 'flat' a solution. Let me know your opinion
or suggestions for a better approach.<br>
<br>
Best regards,<br>
<br>
Mads<br>
<br>
<br>
<br>
On 01/30/2013 07:11 PM, Detlev Offenbach wrote:<br>
</div>
<blockquote cite="mid:9715474.KBG4KLnFAW@saturn" type="cite">
<meta name="qrichtext" content="1">
<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:0;">Hi Mads,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px; "> </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:0;">why are you using QTreeView? I would use
QToolbox for such a layout.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px;
margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px; "> </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:0;">Regards,</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:0;">Detlev<br>
<br>
On Tuesday 29 January 2013, 22:31:14 Mads Ipsen wrote:<br>
</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:40px;
margin-right:40px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><span style=" font-family:'Consolas';">Hi,<br>
<br>
We develop a tool for manipulating atomic structures and have
embedded all the manipulation widgets in a panel bar (widget
on the right in attached screen0.png). The Panel bar has
expandable buttons, which upon expansion display different
interfaces for manipulating the atomic structures.<br>
<br>
The whole thing is implemented using a MVC approach using a
QTreeView and an overloaded QItemDelegate class used for
handling painting of the buttons, sizeHints, etc. The widget
interfaces however, are displayed by setting setIndexWidget()
on the tree view. <br>
<br>
This works fine if the widgets have a fixed size. However if
the atomic structure changes (molecule to crystal), previously
hidden GUI elements may be shown in the widget, which gives
rise to a compressed (bad) layout since the index widget has a
fixed size (screen1.png).<br>
<br>
The only way I could fix this was to use an idle time, that
keeps triggering the emission of the signal<br>
<br>
sizeHintChanged(const QModelIndex & index)<br>
<br>
from the delegate. This immediately triggers a smooth update
of the index widget resulting in screen2.png. From a user
perspective it works fine, but to me it appears somewhat
hacky. Is there eg. a way to monitor layout changes in visible
index widgets?<br>
<br>
Best regards,<br>
<br>
Mads<br>
</span><br>
</p>
<pre style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">-- </span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">+-----------------------------------------------------+</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">| Mads Ipsen |</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">+----------------------+------------------------------+</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">| Gåsebæksvej 7, 4. tv | |</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">| DK-2500 Valby | phone: +45-29716388 |</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">| Denmark | email: </span><a moz-do-not-send="true" href="mailto:mads.ipsen@gmail.com"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#0057ae;">mads.ipsen@gmail.com</span></a><span style=" font-family:'Courier New,courier';"> |</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">+----------------------+------------------------------+</span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </pre>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><br>
<br>
-- </p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;"><span style=" font-size:11pt;
font-weight:600;">Detlev Offenbach</span></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:0;"><a class="moz-txt-link-abbreviated" href="mailto:detlev@die-offenbachs.de">detlev@die-offenbachs.de</a></p>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
+-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: <a class="moz-txt-link-abbreviated" href="mailto:mads.ipsen@gmail.com">mads.ipsen@gmail.com</a> |
+----------------------+------------------------------+
</pre>
</body>
</html>