<div dir="ltr">Thanks! Looks like i was using an older version, not up to date, and the button was not there.<div><br></div><div>good to see that some one else is using this as well :-)</div><div><br></div><div>Thanks again!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-06 9:04 GMT+01:00 Tudor Barascu <span dir="ltr"><<a href="mailto:tudorbarascu@yahoo.com" target="_blank">tudorbarascu@yahoo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><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="m_-6167381871227965816enhancr_card_8211022390" target="_blank">python_logic.jpg</a></div><div><br></div><div id="m_-6167381871227965816ydp37c39277enhancr_card_8211022390" class="m_-6167381871227965816ydp37c39277yahoo-link-enhancr-card m_-6167381871227965816ydp37c39277ymail-preserve-class m_-6167381871227965816ydp37c39277ymail-preserve-style" style="max-width:400px;font-family:Helvetica Neue,Helvetica,Segoe UI,Arial,sans-serif"><a href="https://www.dropbox.com/s/mkj7vwv1j6zgxup/python_logic.jpg?dl=0" style="text-decoration:none!important;color:#000!important" class="m_-6167381871227965816ydp37c39277yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="m_-6167381871227965816ydp37c39277card-wrapper m_-6167381871227965816ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody><tr><td width="400"><table border="0" class="m_-6167381871227965816ydp37c39277card m_-6167381871227965816ydp37c39277yahoo-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="m_-6167381871227965816ydp37c39277card-primary-image-cell" bgcolor="#000000" valign="top" height="175" style="background-image:url("");background-color:rgb(0,0,0);background-size:cover;border-radius:2px 2px 0px 0px;min-height:175px"><table border="0" class="m_-6167381871227965816ydp37c39277card-overlay-container-table m_-6167381871227965816ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="width:100%"><tbody><tr><td class="m_-6167381871227965816ydp37c39277card-overlay-cell" bgcolor="transparent" valign="top" style="background-image:url("");background-color:transparent;border-radius:2px 2px 0px 0px;min-height:175px"><table border="0" class="m_-6167381871227965816ydp37c39277yahoo-ignore-table" height="175" style="width:100%;min-height:175px"><tbody><tr><td class="m_-6167381871227965816ydp37c39277card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="m_-6167381871227965816ydp37c39277card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="m_-6167381871227965816ydp37c39277card-share-container"></div></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td><table border="0" align="center" class="m_-6167381871227965816ydp37c39277card-info m_-6167381871227965816ydp37c39277yahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;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="m_-6167381871227965816ydp37c39277card-object-1 m_-6167381871227965816ydp37c39277yahoo-ignore-inline-image m_-6167381871227965816ydp37c39277ymail-preserve-class" 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="m_-6167381871227965816ydp37c39277card-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="m_-6167381871227965816ydp37c39277card-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="m_-6167381871227965816ydp7c26b7bcyahoo_quoted_8356543675" class="m_-6167381871227965816ydp7c26b7bcyahoo_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 <<a href="mailto:volayaf@gmail.com" target="_blank">volayaf@gmail.com</a>> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="m_-6167381871227965816ydp7c26b7bcyiv7960348701"><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>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="nofollow" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></div>
                </div>
            </div></div></div></blockquote></div><br></div>