<div dir="ltr">Hi Phil and Shaheed<br><div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks Shaheed. I tried with the Abstract keyword but I couldn't make it work<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 4, 2017 at 11:40 AM, Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 4 Jan 2017, at 8:16 am, Guðjón Guðjónsson <<a href="mailto:gudjon.i.gudjonsson@gmail.com">gudjon.i.gudjonsson@gmail.com</a><wbr>> wrote:<br>
><br>
> Hi list<br>
><br>
> I have been writing a python wrapper to the qwt6 library. It is new code, doesn't<br>
> build on PyQwt5.<br>
><br>
> Qwt library:<br>
> <a href="http://qwt.sourceforge.net/" rel="noreferrer" target="_blank">http://qwt.sourceforge.net/</a><br>
><br>
> My python wrapper:<br>
> <a href="https://github.com/GauiStori/PyQt-Qwt" rel="noreferrer" target="_blank">https://github.com/GauiStori/<wbr>PyQt-Qwt</a><br>
><br>
> I do have a problem with pure virtual functions in Qwt.<br>
<br>
</span>So what is the problem?<br></blockquote><div><br>If I don't use the patch, I get the following error:<br><br>g++ -c -g  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security  -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu/qt5/ -I/usr/include/x86_64-linux-gnu/qt5/QtCore/ -I/usr/include/x86_64-linux-gnu/qt5/QtGui/ -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/ -I/usr/include/qwt/ -I/usr/include/python3.5m -o sipQwtQwtSeriesStoreQwtSetSample.o sipQwtQwtSeriesStoreQwtSetSample.cpp<br>./sipQwtQwtSeriesStoreQwtSetSample.cpp: In function ‘void* array_QwtSeriesStoreQwtSetSample(Py_ssize_t)’:<br>./sipQwtQwtSeriesStoreQwtSetSample.cpp:372:52: error: invalid new-expression of abstract class type ‘QwtSeriesStore<QwtSetSample>’<br>     return new QwtSeriesStoreQwtSetSample[sipNrElem];<br>                                                    ^<br>In file included from qwt_series_store.sip:68:0:<br>/usr/include/qwt/qwt_series_store.h:57:7: note:   because the following virtual functions are pure within ‘QwtSeriesStore<QwtSetSample>’:<br> class QwtSeriesStore: public virtual QwtAbstractSeriesStore<br>       ^~~~~~~~~~~~~~<br>/usr/include/qwt/qwt_series_store.h:31:18: note:        virtual void QwtAbstractSeriesStore::dataChanged()<br>     virtual void dataChanged() = 0;<br>                  ^~~~~~~~~~~<br>./sipQwtQwtSeriesStoreQwtSetSample.cpp: In function ‘void* copy_QwtSeriesStoreQwtSetSample(const void*, Py_ssize_t)’:<br>./sipQwtQwtSeriesStoreQwtSetSample.cpp:379:114: error: invalid new-expression of abstract class type ‘QwtSeriesStore<QwtSetSample>’<br>     return new QwtSeriesStoreQwtSetSample(reinterpret_cast<const QwtSeriesStoreQwtSetSample *>(sipSrc)[sipSrcIdx]);<br>                                                                                                                  ^<br>Makefile:17: recipe for target 'sipQwtQwtSeriesStoreQwtSetSample.o' failed<br>make: *** [sipQwtQwtSeriesStoreQwtSetSample.o] Error 1<br><br></div><div>But if I use the patch everything works like charm. I would very much like not to add this patch to the Qwt library because<br></div><div>I think there must be a way around it in Sip.<br><br></div><div>The sip files, patch and .h files are attached.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-">> Another problem is getting the Qt include dir into the configure.py script.<br>
> I have to admit that I don't understand how it is done in the QScintilla script.<br>
> Can anyone point me to another example?<br>
<br>
</span>Again, what is the problem?<br></blockquote><div><br></div></div>I cannot find out how to obtain the Qt include directory automatically in the configure.py script.<br>For PyQt4 it is simple<br><br>from PyQt4 import pyqtconfig<br>pyqtconfig.Configuration().qt_lib_dir<br><br></div><div class="gmail_extra">But I don't know how to do this for PyQt5. <br><br></div><div class="gmail_extra">Regards<br></div><div class="gmail_extra">Gudjon<br><br><br></div></div></div>