I have tried changing
for( int i = 0 ; i < mpPlots.size( ) ; i++ )
{
mpPlotsLayout->remove( *(mpPlots.at( i ) ) );
delete( *( mpPlots.at( i ) ) );
}
mpPlots.clear( );
for( int i = 0 ; i < mpPlots.size( ) ; i++ )
{
mpPlotsLayout->remove( *(mpPlots.at( i ) ) );
delete( *( mpPlots.at( i ) ) );
}
mpPlots.clear( );
To copy to clipboard, switch view to plain text mode
to
for( int i = 0 ; i < mpPlots.size( ) ; i++ )
{
mpPlotsLayout->remove( mpPlots[i] );
delete( mpPlots[i] );
}
mpPlots.clear( );
for( int i = 0 ; i < mpPlots.size( ) ; i++ )
{
mpPlotsLayout->remove( mpPlots[i] );
delete( mpPlots[i] );
}
mpPlots.clear( );
To copy to clipboard, switch view to plain text mode
But this change did not change anything. I have also tried calling hide on the QGLWidget after the remove and before the delete and this didn't help anything. I have also tried just the hide( ) call without the remove( ) call and this didn't help. I have done this in Qt 4 with a call to removeWidget( ) followed by a delete( ) call but remove doesn't seem to work. Is there something I need to do with the QGLWidget's parent? Thanks again for any help you have...this is very annoying.
Bookmarks