Sunday 28 May 2017

pyqgis - How to show QGIS plugin dialog always on top?



Is it possible to define for a pyqgis plugin, that the plugin dialog is always shown on top, after starting it from the toolbar?



Answer



As mentioned in comments by Nathan W, use Qt.WindowStaysOnTopHint in your init function:


    class MyCustomDialog(QtGui.QDialog):
def __init__(self, iface):

QtGui.QDialog.__init__(self, None, Qt.WindowStaysOnTopHint)
...

But it will stay on top of not only this and every other application you have.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...