Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
Qt Creator 2.7.1
-
None
-
Linux qwerty-Computer 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:49:53 UTC 2012 i686 i686 i686 GNU/Linux
Qt 4.8.3
QtCreator 2.7.1
Description
If I had the key word this on With this simple code, QtCreator Segfault...
#include <QWidget> template <class T> class QWidgetDraw : public T { public: explicit QWidgetDraw( QWidget* parent = 0 ) : QWidget(parent) {} protected: virtual void paintEvent( QPaintEvent* event ); }; template <class T> virtual void QWidgetDraw<T>::paintEvent( QPaintEvent* event ) { Q_UNUSED(event); QPainter painter(this); painter.setRenderHint( QPainter::Antialiasing ); // Draw simple widget QStyleOption opt; opt.init(this); //////////////////////////////////////////////////////////////////////////// // Try to add this-> to this line style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); }