[QGIS-Developer] Drag and drop form function QdateEdit Widget init
PIERRE Sylvain
sylvain.pierre at alsace.eu
Fri Mar 25 00:33:12 PDT 2022
Hi,
I build a form for a layer with drag and drop mode, and I use an init function to init some value for some widdget. I have no problem to do that with Qcombobox an QLineEdit widget :
linedit_imat = dialog.findChild(QLineEdit,"code_eqpt")
linedit_imat.setText(imatEqpt)
linedit_com = dialog.findChild(QLineEdit,"fk_commune")
linedit_com.setText(find_comtxt)
But this is not working with QDateEdit widget :
today = date.today()
control = dialog.findChild(QDateEdit,"date_insert")
control.setDateTime(today)
What is the right syntax to init the date widget ? It's impossible to debug init script (or may be I'm missing something...)
Thanks
[cid:image002.jpg at 01D84022.F648C6E0]
Sylvain PIERRE
Chef de projet système d'information
Direction des Systèmes d'Information et du Développement Numérique
Service Projets et Ingénierie Numérique
Collectivité européenne d'Alsace
Tél : 03 88 76 68 88
sylvain.pierre at alsace.eu<mailto:sylvain.pierre at alsace.eu>
www.alsace.eu<http://www.alsace.eu>
[facebook]<http://www.facebook.com/toutelalsace> [twitter] <http://www.twitter.com/toutelalsace> [insta] <http://www.instagram.com/toutelalsace>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220325/a409d31f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 8094 bytes
Desc: image002.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220325/a409d31f/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 827 bytes
Desc: image004.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220325/a409d31f/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 853 bytes
Desc: image006.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220325/a409d31f/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1038 bytes
Desc: image008.png
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220325/a409d31f/attachment-0005.png>
More information about the QGIS-Developer
mailing list