On 3/25/22 09:04, PIERRE Sylvain wrote:
Thanks for tip Richard, but I've tried with
today = QtCore.QDateTime.currentDateTime()
But it's not working
I get it working with:
from qgis.PyQt.QtWidgets import QWidget, QMessageBox, QDateEdit, QDateTimeEdit
from qgis.PyQt.QtCore import Q
.eu>>;
qgis-developer@lists.osgeo.org<mailto:qgis-developer@lists.osgeo.org>
Objet : Re: [QGIS-Developer] Drag and drop form function QdateEdit Widget init
Soyez vigilant : ce courriel provient d'une organisation externe à la CeA.
• Assure
ge d'origine-
De : Richard Duivenvoorde
Envoyé : vendredi 25 mars 2022 08:50
À : PIERRE Sylvain ;
qgis-developer@lists.osgeo.org
Objet : Re: [QGIS-Developer] Drag and drop form function QdateEdit
Widget init
Soyez vigilant : ce courriel provient d'une organisation externe à la
CeA.
* Assur
voyé : vendredi 25 mars 2022 08:50
> À : PIERRE Sylvain ;
> qgis-developer@lists.osgeo.org
> Objet : Re: [QGIS-Developer] Drag and drop form function QdateEdit Widget
> init
>
> Soyez vigilant : ce courriel provient d'une organisation externe à la CeA.
> • Assurez-vous d’
jet : Re: [QGIS-Developer] Drag and drop form function QdateEdit Widget init
Soyez vigilant : ce courriel provient d'une organisation externe à la CeA.
• Assurez-vous d’abord qu’il ne s’agit pas d’un email malveillant avant de
cliquer sur tout lien ou pièce jointe.
==
On 3/25/22 08:33, PIERRE Sylvain via QGIS-Developer wrote:
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
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")
linedi