<div dir="ltr">Hi to all,<div><br></div><div>I need a help from a python guru. I'm trying to move my first steps with pyqgis.</div><div><br></div><div>I've got two qgis layer with a 1 to many relation. I create a custom form for the parent layer with a QTableWidget that contain the primary key of the child layer. Now I want to open another custom form with the data of the child record selected into the QTableWidget. I try to look up into the QGIS API Documentation but I'didn't find the solution to my problem.</div>
<div><br></div><div>Now I just can open form with this code, connected with a button:</div><div><br></div><div><div>    path = os.path.dirname( os.path.abspath( __file__ ) )</div><div>    uifile = os.path.join(path , my_form.ui')<br>
</div><div>    window = uic.loadUi(uifile)</div><div>    window.exec_()</div></div><div><br></div><div>how can I connect my form with the right data ?</div><div>Can I use some method to select the right layer/record and open it in the form ?</div>
<div><br></div><div>Thanks in advance for any tips</div><div><br></div><div>Luca</div></div>