Python qt syntax error

I have a top level widget that creates a syntax error in python. raise () on line 15. This is the use of Qt python bindings. I know that promotion is a python reserved word. I am looking for how to call the Qt function "raise ()" with python bindings.

#!/usr/bin/python

# simple.py

import sys 
from PyQt4 import QtGui

app = QtGui.QApplication(sys.argv)

widget = QtGui.QWidget()
widget.resize(250, 150)
widget.setWindowTitle('simple')
widget.show()
widget.activateWindow ()
widget.raise() 

sys.exit(app.exec_())
+3
source share
1 answer

"raise" - ( ) Python. , . PyQt4, , , , , , , . , "from" (pet peeve: Python , ...)

SO.

pythoneering... raise_. , . , /.

+11

Source: https://habr.com/ru/post/1727108/


All Articles