Skip to content

Commit

Permalink
Apparently sip doesn't like double QObject inheritance
Browse files Browse the repository at this point in the history
If a list of objects (QList<QgsMapCanvasItem *>) is converted to a list of python objects, sip fails if items inherit from QObject.
Fix #32700
  • Loading branch information
m-kuhn committed Nov 9, 2019
1 parent 7fd0e33 commit b648a64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsrubberband.sip.in
Expand Up @@ -15,7 +15,7 @@
#include <qgsrubberband.h>
%End

class QgsRubberBand : QObject, QgsMapCanvasItem
class QgsRubberBand : QgsMapCanvasItem
{
%Docstring
A class for drawing transient features (e.g. digitizing lines) on the map.
Expand Down
5 changes: 5 additions & 0 deletions src/gui/qgsrubberband.h
Expand Up @@ -45,8 +45,13 @@ class QPaintEvent;
* The QgsRubberBand class provides a transparent overlay widget
* for tracking the mouse while drawing polylines or polygons.
*/
#ifndef SIP_RUN
class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
{
#else
class GUI_EXPORT QgsRubberBand : public QgsMapCanvasItem
{
#endif
Q_OBJECT

#ifdef SIP_RUN
Expand Down

0 comments on commit b648a64

Please sign in to comment.