<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">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 :<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">linedit_imat</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#859900;mso-fareast-language:FR">=</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"> dialog.findChild(</span><span style="font-size:10.5pt;font-family:Consolas;color:#CB4B16;mso-fareast-language:FR">QLineEdit</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">,</span><span style="font-size:10.5pt;font-family:Consolas;color:#2AA198;mso-fareast-language:FR">"code_eqpt"</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">linedit_imat</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">.setText(</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">imatEqpt</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)
<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">linedit_com</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#859900;mso-fareast-language:FR">=</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"> dialog.findChild(</span><span style="font-size:10.5pt;font-family:Consolas;color:#CB4B16;mso-fareast-language:FR">QLineEdit</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">,</span><span style="font-size:10.5pt;font-family:Consolas;color:#2AA198;mso-fareast-language:FR">"fk_commune"</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">linedit_com</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">.setText(</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">find_comtxt</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But this is not working with QDateEdit widget :<o:p></o:p></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">today</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#859900;mso-fareast-language:FR">=</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#CB4B16;mso-fareast-language:FR">date</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">today</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">()<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">control</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#859900;mso-fareast-language:FR">=</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"> dialog.findChild(</span><span style="font-size:10.5pt;font-family:Consolas;color:#CB4B16;mso-fareast-language:FR">QDateEdit</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">,</span><span style="font-size:10.5pt;font-family:Consolas;color:#2AA198;mso-fareast-language:FR">"date_insert"</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">control</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">.setDateTime(</span><span style="font-size:10.5pt;font-family:Consolas;color:#268BD2;mso-fareast-language:FR">today</span><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#002B36"><span style="font-size:10.5pt;font-family:Consolas;color:#839496;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal">What is the right syntax to init the date widget ? It’s impossible to debug init script (or may be I’m missing something…)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="3" cellpadding="0" width="0" style="width:483.45pt;margin-left:-1.5pt">
<tbody>
<tr style="height:115.45pt">
<td width="134" valign="top" style="width:98.5pt;padding:0cm 0cm 0cm 0cm;height:115.45pt">
<p class="MsoNormal" style="margin-left:21.3pt;text-indent:-21.3pt;line-height:115%">
<span style="mso-fareast-language:FR"><img width="103" height="143" style="width:1.075in;height:1.4916in" id="Image_x0020_2" src="cid:image002.jpg@01D84022.F648C6E0"></span><b><span lang="EN-US" style="font-size:14.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#CC0066;mso-fareast-language:FR"><o:p></o:p></span></b></p>
</td>
<td width="510" style="width:380.45pt;padding:1.5pt 1.5pt 1.5pt 1.5pt;height:115.45pt">
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:21.3pt;text-indent:-21.3pt;line-height:115%">
<span lang="EN-US" style="font-size:13.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#003399;mso-fareast-language:FR">Sylvain PIERRE</span><b><span lang="EN-US" style="line-height:115%;font-family:"Verdana",sans-serif;color:#003399;mso-fareast-language:FR"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Chef de projet système d’information<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Direction des Systèmes d’Information et du Développement Numérique<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Service Projets et Ingénierie Numérique<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<b><span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Collectivité européenne d’Alsace<o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Tél : 03 88 76 68 88<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR"><a href="mailto:sylvain.pierre@alsace.eu"><span style="color:blue">sylvain.pierre@alsace.eu</span></a><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<a href="http://www.alsace.eu"><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:blue;mso-fareast-language:FR">www.alsace.eu</span></a><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%">
<a href="http://www.facebook.com/toutelalsace"><span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img border="0" width="14" height="15" style="width:.15in;height:.1583in" id="Image_x0020_4" src="cid:image004.png@01D84022.F648C6E0" alt="facebook"></span></a><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"> </span><a href="http://www.twitter.com/toutelalsace"><span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img border="0" width="15" height="15" style="width:.1583in;height:.1583in" id="Image_x0020_7" src="cid:image006.png@01D84022.F648C6E0" alt="twitter"></span></a><span lang="EN-US" style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"> </span><a href="http://www.instagram.com/toutelalsace"><span style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img border="0" width="15" height="15" style="width:.1583in;height:.1583in" id="Image_x0020_8" src="cid:image008.png@01D84022.F648C6E0" alt="insta"></span></a><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>