<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Richard<br>
</p>
<div class="moz-cite-prefix">On 9/28/18 10:17 AM, Richard
Duivenvoorde wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2f4b55eb-90b7-bcd1-1c5f-ad6c98f792aa@duif.net">
<pre class="moz-quote-pre" wrap="">On 09/28/2018 12:07 AM, Nyall Dawson wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Fri, 28 Sep 2018 at 00:08, Richard Duivenvoorde <a class="moz-txt-link-rfc2396E" href="mailto:rdmailings@duif.net"><rdmailings@duif.net></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Using the I-tool and viewing via 'Auto open form', the attributes of a
feature are barely readable (see attached screenshot).
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Oh this has bugged me a LOT too! I'd very much like to see this
changed, but I'm not sure if there's some rationale behind it I'm
missing...
Nyall
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Looking into this a little, we use make the widget 'enabled=false' I think?
What about instead only do 'readOnly=true'?
Then you 'miss' the visual cue that a form field is read only.
There could be a message when you try to edit the field?
Or in combination with 'frame=false' you would get a form in which the
fields do not like 'input fields'.</pre>
</blockquote>
<p>That sounds like an idea.</p>
<p>Have a look here, that's the default behavior with setEnabled,
where the actual modification of the widget is done:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/qgis/QGIS/blob/master/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp#L65">https://github.com/qgis/QGIS/blob/master/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp#L65</a></p>
<p>it needs to be checked with all different widgets if they are
still in a sane and expected readonly state. If one is not, the
behavior can be finetuned in their respective wrapper, as done
e.g. here
<a class="moz-txt-link-freetext" href="https://github.com/qgis/QGIS/blob/master/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp#L136">https://github.com/qgis/QGIS/blob/master/src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp#L136</a></p>
<p>Cheers</p>
<p>Matthias<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:2f4b55eb-90b7-bcd1-1c5f-ad6c98f792aa@duif.net">
<pre class="moz-quote-pre" wrap="">
Mmm, was trying to look into this, to find out that we use a wrapper
around the widgets:
<a class="moz-txt-link-freetext" href="https://github.com/qgis/QGIS/blob/master/src/gui/qgsattributeform.cpp#L1077">https://github.com/qgis/QGIS/blob/master/src/gui/qgsattributeform.cpp#L1077</a>
Removing the
ww->setEnabled( enabled );
morphs the input in the default input of QGIS
ww does not have readonly or frame anymore
So more difficult then I hoped :-(
Richard
</pre>
</blockquote>
<blockquote type="cite"
cite="mid:2f4b55eb-90b7-bcd1-1c5f-ad6c98f792aa@duif.net"><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="moz-signature">
<title></title>
<div class="moz-signature"> <span style="text-align: left;
color: #000000; font-family: 'Verdana', sans-serif;
font-size: 10pt">Matthias Kuhn</span><br>
<a href="mailto:matthias@opengis.ch" target="_blank"> <span
style="text-align: left; color: #000000; font-family:
'Verdana', sans-serif; font-size: 8pt">matthias@opengis.ch</span>
</a><br>
<span style="text-align: left; color: #000000; font-family:
'Verdana', sans-serif; font-size: 8pt"><a
href="tel:+41764356763">+41 (0)76 435 67 63</a></span><br>
<div> <a href="http://www.opengis.ch"> <img
moz-do-not-send="false"
src="cid:part3.048517D2.48DCAE7D@opengis.ch"
alt="OPENGIS.ch Logo" width="200" height="80"></a> </div>
</div>
</div>
</div>
</body>
</html>