<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
            <div>Hi Victor,</div><div><br></div><div>I had the same problem in finding where to put the python logic in QGIS 3.</div><div>Here you go: <a href="https://www.dropbox.com/s/mkj7vwv1j6zgxup/python_logic.jpg?dl=0" class="enhancr_card_8211022390">python_logic.jpg</a></div><div><br></div><div id="ydp37c39277enhancr_card_8211022390" class="ydp37c39277yahoo-link-enhancr-card ydp37c39277ymail-preserve-class ydp37c39277ymail-preserve-style" style="max-width:400px;font-family:Helvetica Neue, Helvetica, Segoe UI, Arial, sans-serif;" data-url="https://www.dropbox.com/s/mkj7vwv1j6zgxup/python_logic.jpg?dl=0" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://www.dropbox.com/s/mkj7vwv1j6zgxup/python_logic.jpg?dl=0" style="text-decoration:none !important;color:#000 !important;" class="ydp37c39277yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="ydp37c39277card-wrapper ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px;"><tbody><tr><td width="400"><table border="0" class="ydp37c39277card ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px;"><tbody><tr><td class="ydp37c39277card-primary-image-cell" background="https://s.yimg.com/lo/api/res/1.2/W8u5h9frFY3Q669M7P0jxQ--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.dropbox.com/temp_thumb_from_token/s/mkj7vwv1j6zgxup?preserve_transparency=False&size=1024x1024&size_mode=2.cf.jpg" bgcolor="#000000" valign="top" height="175" style="background-image: url("https://s.yimg.com/lo/api/res/1.2/W8u5h9frFY3Q669M7P0jxQ--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.dropbox.com/temp_thumb_from_token/s/mkj7vwv1j6zgxup?preserve_transparency=False&size=1024x1024&size_mode=2.cf.jpg"); background-color: rgb(0, 0, 0); background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/W8u5h9frFY3Q669M7P0jxQ--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.dropbox.com/temp_thumb_from_token/s/mkj7vwv1j6zgxup?preserve_transparency=False&size=1024x1024&size_mode=2.cf.jpg"/></v:rect><![endif]--><table border="0" class="ydp37c39277card-overlay-container-table ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="width:100%;"><tbody><tr><td class="ydp37c39277card-overlay-cell" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png" bgcolor="transparent" valign="top" style="background-image: url("https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"); background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table border="0" class="ydp37c39277yahoo-ignore-table" height="175" style="width: 100%; min-height: 175px;"><tbody><tr><td class="ydp37c39277card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top;"></td><td class="ydp37c39277card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;"><div class="ydp37c39277card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table border="0" align="center" class="ydp37c39277card-info ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0 0 2px 2px;border-top:1px solid rgb(224, 228, 233);"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px;"><img class="ydp37c39277card-object-1 ydp37c39277yahoo-ignore-inline-image ydp37c39277ymail-preserve-class" src="https://s.yimg.com/nq/storm/assets/enhancrV2/23/logos/dropbox.png" height="36" style="min-width:36px;margin-top:3px;"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:Helvetica Neue, Helvetica, Segoe UI, Arial, sans-serif;border-radius:0 0 2px 0;"><h2 class="ydp37c39277card-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif; color: rgb(38, 40, 42);">python_logic.jpg</h2><p class="ydp37c39277card-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 155, 167);">Shared with Dropbox</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div>In the image above it's a button on the right of the Provide ui-file and on the left of the "Show form on add feature...</div><div><br></div><div>Regards,</div><div>Tudor </div><div><br></div><div><br></div>
            
            <div id="ydp7c26b7bcyahoo_quoted_8356543675" class="ydp7c26b7bcyahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Tuesday, February 6, 2018, 9:33:27 AM GMT+2, Victor Olaya <volayaf@gmail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="ydp7c26b7bcyiv7960348701"><div dir="ltr">Hi<div><br></div><div>I am writing documentation about custom forms, but I am encountering some problems.</div><div><br></div><div>In the case of QGIS 2, it seems that there is no way of avoiding the dialog to be closed when the OK button is clicked. I read this <a href="https://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/" rel="nofollow" target="_blank">blog post </a>by Nathan, in which it disconnects the default 'accepted' signal from the 'dialog.accept' slot. I tried that, but it doesnt seem to be working. It runs the validation function that I connect to that signal, but even if I dont accept the dialog in that function, it closes it.</div><div><br></div><div>I also tried using the disconnectButtonBox() method of the QgsAttributeForm class, but it does nothing. The buttons still do their work.</div><div><br></div><div>Is this a bug, or I am doing something wrong?</div><div><br></div><div>In QGIS3, it seems that now only the ui file can be provided, but not a python file with the form logic. How is that added now?<br></div><div><br></div><div>Thanks!</div></div></div>_______________________________________________<br>QGIS-Developer mailing list<br><a href="mailto:QGIS-Developer@lists.osgeo.org" rel="nofollow" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
                </div>
            </div></div></body></html>