You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic problem here is that arbitrary Julia objects are not callable (JuliaLang/julia#2403). So, when PyCall performs an automatic type conversion (as it does for QtGui.QMessageBox), it has to decide whether to convert an object to a Function (which makes it easy to call, but you can't do anything else with it), or leave it as a PyObject (which lets you do anything you want, but then you need to use pycall(...) to call it).
For type constructors, it seemed like what you wanted to do most of the time was to construct instances of the type by calling the constructor, so I defaulted to converting to a Function. But this means that, in order to access static members, you need to explicitly request the raw PyObject instead.
Here, you can do that by QtGui.pymember("QMessageBox"), with which you can then do QtGui.pymember("QMessageBox")[:information](...). Or call pyimport as you mentioned.
I couldn't think of a better syntax, but suggestions are welcome.
I ran into this trying to use PyQt4.QtGui.QMessageBox.information().
This doesn't work:
But this does:
(amazing job btw, this was my only issue running this PyQt code)
Some details:
The text was updated successfully, but these errors were encountered: