the following program (an extract of real code)
from pyqt4 import qtgui import sys pyqt4.qtgui import qmessagebox def main(): app = qtgui.qapplication([]) w = qtgui.qpushbutton("test") def on_pressed(): print("pressed") qmessagebox.warning(w, 'info', 'button pressed') w.pressed.connect(on_pressed) w.show() sys.exit(app.exec_()) if __name__ == '__main__': main()
triggers following 3 warnings in pycharm (eg when running code/inspect code...
) related qmessagebox.warning
call
calling method class using instance of different class; passing pyqt4.qtgui.qpushbutton.qpushbutton instead of pyqt4.qtgui.qmessagebox.qmessagebox. intentional?
incorrect call arguments; parameter 'qstring_1' unfilled
type checker; expected type 'qmessagebox', got 'qpushbutton' instead
and 1 warning related pyqt connect
call
cannot find reference 'connect' in 'function'
any idea how can work-around/avoid these warnings?
Comments
Post a Comment