I need reliable information about "this" subject:
class MyClass, public QWidget
{
public:
MyClass( QWidget * parent = NULL )
:QWidget( parent ),
mpAnotherWidget( new QWidget( this ) ){};
private:
QWidget * mpAnotherWidget;
};
Of course, calling virtual functions in contructor OR initialization list is a bad idea. The Question is: can this code
mpAnotherWidget( new QWidget( this ) )
lead to undefined behavior?! And if so: why ?
Please quote your sources if you can! Thanks!