PyQt5 Focus QMainWindow as first window
I am building an application in pyqt, which is called by another application with another graphical interface not built in pyqt. I have a QMainWindow, the problem is that when the boot appears behind the other application, and I do not know how to make it appear with the focus. I try to pass window type in a constructor Qt_WindowType But does not work This is my class class Foo(QMainWindow): def __init__(self, logger): super(Foo, self).__init__() # more code... self.show() if __name__ == '__main__': app = QApplication(sys.argv) ex = ScanGui(logger) sys.exit(app.exec_()) Thx.
Depending on what you are exactly looking for I'd say to have a look in this flag: self.setWindowFlags(Qt.WindowStaysOnTopHint) You can also make use of Modal modality. SetWindowModality instead of WindowStayOnTopHint, and both modal modes (Qt.WindowModal and Qt.ApplicationModal) permit other applications to be on top of your modal window.
Django Haystack and Elasticsearch Error Using rebuild_index
Can't keep a total of numbers in python
replace if else with a for loop
Panda3D - Setting date
decoding json in python
Python debugging, stop at particular output
Why an avi file can not be opened in OpenCV-Python
Can't compile msgpack Python extension under windows
Python sockets for a n-players game
HTMLParser or urllib2 unicode issue
How to stop PyCharm inserting spaces for fine alignment when reformating code?
Install NLTK with IronPyton for VS2012
pip install won't install on my machine
Integrating using scipy.integrate.simps
Problems with django and virtualenv
Returning when any Future in a list finishes