[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] sip reimplemented protected function
From: Matt Newell <newellm () blur ! com>
Date: 2014-01-16 16:29:40
Message-ID: 2404227.3IG7qFEMeA () obsidian
[Download RAW message or body]
I have a sip wrapped class HtmlHighlighter that inherits from
QSyntaxHighlighter, and it won't compile giving the error:
/usr/share/sip/PyQt4/QtGui/qsyntaxhighlighter.sip: In function ‘PyObject*
meth_HtmlHighlighter_setCurrentBlockUserData(PyObject*, PyObject*,
PyObject*)':
/usr/share/sip/PyQt4/QtGui/qsyntaxhighlighter.sip:78:77: error:
‘qtgui_wrap_ancestors' was not declared in this scope
PyObject *py_td = qtgui_wrap_ancestors(td,
sipType_QTextDocument);
First of all if QSyntaxHighlighter is already wrapped in PyQt[45], I would
think a subclass should not need to have the non-virtual protected methods
reimplemented to be accessible at the python level. It should be safe to let
python call meth_QSyntaxHighlighter_setCurrentBlockUserData, which will call
sipQSyntaxHighlighter's version. I realize that sipHtmlHighlighter won't be a
subclass of sipQSyntaxHighlighter, but that shouldn't actually matter in this
case. This may even be the case for virtual function, but I'm not sure.
Second, I think there should be a class annotation specifying that the wrapped
class doesn't need access to the protected functions.
Thanks,
Matt
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic