<font size=2 face="sans-serif">Hallo und vielen Dank,</font>
<br>
<br><font size=2 face="sans-serif">der Hinweis hat mich in die richtige
Spur gebracht.</font>
<br>
<br><font size=2 face="sans-serif">Ich hatte nur "Formulare"
angehakt. Die Default-Werte werden aber offensichtlich unter "Felder"
gemerkt.</font>
<br>
<br><font size=2 face="sans-serif">Danke :)</font>
<br><font size=2 face="sans-serif">Freundliche Grüße aus Leipzig<br>
Susann Schmidt<br>
Softwareentwicklung <br>
<br>
**************************************************************<br>
<br>
GFI - Gesellschaft für Informationstechnologie mbH<br>
Philipp-Rosenthal-Straße 9<br>
D-04103 Leipzig<br>
Geschäftsführer: Andreas Richter<br>
Amtsgericht Leipzig HRB 12054<br>
USt.-IdNr.: DE179049354     Steuer-Nr.: 231/109/06412<br>
Tel. 0341 961 3310    Fax 0341 961 3311   Mail info@gfi-gis.de<br>
Web  </font><a href="www.gfi-gis.de"><font size=2 face="sans-serif">www.gfi-gis.de</font></a><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">"Thomas B"
<rdbath.regiodata@gmail.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">SSchmidt@gfi-gis.de</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">30.05.2023 08:30</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Re: [QGIS-Developer]
no default value in style.qml</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>Hallo,</font>
<br><font size=3>kurzer Hinweis zur Frage auf der QGIS-Developer-Liste.</font>
<br><font size=3>Kann es sein, dass beim Speichern des Stils der Punkt
"Formulare" nicht angehakt war? Ich hab das kurz getestet in
QGIS 3.28 und da funktioniert es, dass die Default-Werte in die QML geschrieben
werden und auch beim Reinladen des Layers wieder ziehen.</font>
<br><font size=3>Beim Speichern der QML war allerdings der Punkt "Formulare"
nicht angehakt, obwohl es was zu speichern gab....den musste ich erst noch
von Hand aktivieren.</font>
<br>
<br>
<br><font size=3>Im QML gibt es dann einen derartigen Abschnitt:</font>
<br>
<br><font size=3>  <defaults><br>
    <default field="full_id" applyOnUpdate="1"
expression="@id"/><br>
    <default field="osm_id" applyOnUpdate="0"
expression=""/><br>
    <default field="osm_type" applyOnUpdate="0"
expression="'testeintrag'"/><br>
    <default field="building" applyOnUpdate="0"
expression=""/><br>
    <default field="name" applyOnUpdate="0"
expression=""/><br>
    <default field="amenity" applyOnUpdate="0"
expression=""/><br>
    <default field="brand" applyOnUpdate="0"
expression=""/><br>
    <default field="wheelchair" applyOnUpdate="0"
expression=""/><br>
  </defaults></font>
<br>
<br><font size=3>VG</font>
<br><font size=3>Thomas</font>
<br>
<br><font size=3>Am Fr., 26. Mai 2023 um 13:01 Uhr schrieb SSchmidt---
via QGIS-Developer <</font><a href="mailto:qgis-developer@lists.osgeo.org"><font size=3 color=blue><u>qgis-developer@lists.osgeo.org</u></font></a><font size=3>>:</font>
<br><font size=2 face="sans-serif">Hello,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I want to setup a formular for a vectorlayer. For a field(text or number)
I want to have a default value. I assumed to achieve this with QgsEditorWidgetSetup.
</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
To learn how the notation should be, I tried to save an example in QGIS(3.16,
3.22.16, master) directly in a style.qml file. But there is no entry for
a default value. If I load the style.qml to a new layer, QGIS doesn't show
my default values.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
So is this an error or? Or is it unmeant to save default values in a style?
If so, how can I set a default value to a field in c++?</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Freundliche Grüße aus Leipzig<br>
Susann Schmidt<br>
Softwareentwicklung <br>
<br>
**************************************************************<br>
<br>
GFI - Gesellschaft für Informationstechnologie mbH<br>
Philipp-Rosenthal-Straße 9<br>
D-04103 Leipzig<br>
Geschäftsführer: Andreas Richter<br>
Amtsgericht Leipzig HRB 12054<br>
USt.-IdNr.: DE179049354     Steuer-Nr.: 231/109/06412<br>
Tel. 0341 961 3310    Fax 0341 961 3311   Mail </font><a href="mailto:info@gfi-gis.de" target=_blank><font size=2 color=blue face="sans-serif"><u>info@gfi-gis.de</u></font></a><font size=2 face="sans-serif"><br>
Web  </font><a href="http://www.gfi-gis.de/" target=_blank><font size=2 color=blue face="sans-serif"><u>www.gfi-gis.de</u></font></a><font size=3><br>
_______________________________________________<br>
QGIS-Developer mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:QGIS-Developer@lists.osgeo.org" target=_blank><font size=3 color=blue><u>QGIS-Developer@lists.osgeo.org</u></font></a><font size=3><br>
List info: </font><a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target=_blank><font size=3 color=blue><u>https://lists.osgeo.org/mailman/listinfo/qgis-developer</u></font></a><font size=3><br>
Unsubscribe: </font><a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target=_blank><font size=3 color=blue><u>https://lists.osgeo.org/mailman/listinfo/qgis-developer</u></font></a>
<br>
<br>