Is it possible to define for a pyqgis plugin, that the plugin dialog is always shown on top, after starting it from the toolbar?
-
2This is rather a pyqt question and not really related to pyQGIS. Have a look at the following links at stackoverflow -> stackoverflow.com/questions/1925015/pyqt-always-on-top or stackoverflow.com/questions/4850584/…– CurlewCommented Aug 29, 2013 at 22:43
-
1Just watch Qt.WindowStaysOnTopHint because it will be above all windows, even non QGIS ones.– Nathan WCommented Aug 29, 2013 at 23:41
Add a comment
|
1 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.
-
yes, that's what I want - have it always on top. Works well - thanks a lot!– dassauCommented Aug 30, 2013 at 8:16