Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: master, 6.22/00
-
Component/s: PyROOT
-
Labels:None
-
Environment:
Both Python2 and Python3
Description
Inheritance of Python classes from C++ does not work in some cases, as discussed in:
https://sft.its.cern.ch/jira/browse/ROOT-10789
https://sft.its.cern.ch/jira/browse/ROOT-10582
This ticket is created to track how that issue affects the creation of GUIs from Python. In particular, the GUI example tutorial in Python does not work:
https://root.cern.ch/doc/master/gui__ex_8py.html
since it fails to inherit from TGMainFrame, with the following error:
input_line_39:9:43: error: base class '::TGMainFrame' has private copy constructor
|
Dispatcher1(const Dispatcher1& other) : TGMainFrame(other), m_self(other.m_self, this) {}
|
^
|
/home/etejedor/root/fork/build/include/TGFrame.h:487:4: note: declared private here
|
TGMainFrame(const TGMainFrame&); // not implemented
|
^
|
a.py:2: RuntimeWarning: no python-side overrides supported
|
class pMainFrame( ROOT.TGMainFrame ):
|
Once the issue above is fixed, in addition, the TPyDispatcher functionality used in the old PyROOT should be replaced by a better alternative to register Python callables as GUI callbacks. We should be able to do this automatically by relying on the automatic generation of C++ wrappers for Python callables that cppyy provides.