<div dir="ltr">You can use an eventfilter. You can find an example here <a href="https://github.com/opengisch/QgisModelBaker/blob/master/QgisModelBaker/qgismodelbaker.py#L507C7-L552">https://github.com/opengisch/QgisModelBaker/blob/master/QgisModelBaker/qgismodelbaker.py#L507C7-L552</a><br><br>However, it may be appropriate to have a setting for this. In the plugin mentioned above, the user is asked if they want to open this type of file always with this plugin in the future.<div> <br>Cheers<br>Dave</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 5, 2023 at 1:54 AM Pankajeshwara Sharma via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello all,<br><br>I would like a feature within QGIS so that when files with ".xyz" extension are dragged onto the application, would make my plugin to open automatically. <div>This can prevent the user from having to go to the File menu and open the file.<br><div><br></div><div>This is similar to when shapefiles are dragged onto QGIS, and the shapefiles are automatically loaded and displayed in QGIS.</div><div>Except, dragging a file with a ".xyz" extension should result in my plugin (a dialog box from then plugin) to open. </div><div><br></div><div>Is there a setting I can configure?<br></div><div><br></div><div>Yours sincerely,<br>Pankaj Sharma<br>Research Fellow<br>University of Auckland<br><a href="mailto:pankaj.sharma@auckland.ac.nz" target="_blank">pankaj.sharma@auckland.ac.nz</a></div></div></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>