[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] sip reimplemented protected function
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2014-01-17 15:01:52
Message-ID: a21a83ec2b8a4411161c758fa817a75f () www ! riverbankcomputing ! com
[Download RAW message or body]
On 16-01-2014 4:29 pm, Matt Newell wrote:
> 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.
I think this is already fixed in the current snapshot.
Phil
_______________________________________________
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