diff --git a/source/ConfigureResolutionDialog.cpp b/source/ConfigureResolutionDialog.cpp index 5443526..5060c02 100755 --- a/source/ConfigureResolutionDialog.cpp +++ b/source/ConfigureResolutionDialog.cpp @@ -47,7 +47,7 @@ ConfigureResolutionDialog::ConfigureResolutionDialog( QWidget *parent ) : // headLayout - headLayout = new QHBoxLayout( this ); + headLayout = new QHBoxLayout(); headLayout->setObjectName( QStringLiteral( "headLayout" ) ); dialogTitleLabel = new QLabel( this ); @@ -73,7 +73,7 @@ ConfigureResolutionDialog::ConfigureResolutionDialog( QWidget *parent ) : // standardResolutionLayout - standardResolutionLayout = new QHBoxLayout( this ); + standardResolutionLayout = new QHBoxLayout( ); standardResolutionLayout->setObjectName( QStringLiteral( "standardResolutionLayout" ) ); standardResolutionLabel = new QLabel( this ); standardResolutionLabel->setObjectName( QStringLiteral( "standardResolutionLabel" ) ); diff --git a/source/ImageInterface.cpp b/source/ImageInterface.cpp index 4cdae3e..171aa69 100644 --- a/source/ImageInterface.cpp +++ b/source/ImageInterface.cpp @@ -44,12 +44,8 @@ ImageInterface::ImageInterface( QWidget * parent ) : isUntitled = true; m_cViewArea = new ViewArea( this ); + //m_cViewArea = new QLabel( this ); -// m_cViewArea = new QLabel( this ); -// m_cViewArea->setScaledContents( true ); -// m_cViewArea->setBackgroundRole( QPalette::Base ); -// //m_cViewArea->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); -// m_cViewArea->setScaledContents( false ); setWidgetResizable( true ); setAttribute( Qt::WA_DeleteOnClose ); @@ -91,8 +87,7 @@ bool ImageInterface::loadFile( const QString &fileName ) QApplication::restoreOverrideCursor(); //QImage image( fileName ); - //m_cViewArea->setImage( QPixmap::fromImage( image ) ); - + //m_cViewArea->setPixmap( QPixmap::fromImage( m_currStream.getFrameQImage() ) ); m_cViewArea->setImage( QPixmap::fromImage( m_currStream.getFrameQImage() ) ); normalSize(); @@ -153,8 +148,8 @@ Void ImageInterface::scaleView( Double factor ) { //Q_ASSERT( m_cViewArea->pixmap() ); m_dScaleFactor *= factor; - m_cViewArea->setZoomFactor( m_dScaleFactor ); //m_cViewArea->resize( m_dScaleFactor * m_cViewArea->pixmap()->size() ); + m_cViewArea->setZoomFactor( m_dScaleFactor ); adjustScrollBar( m_dScaleFactor ); } diff --git a/source/plaYUVerApp.cpp b/source/plaYUVerApp.cpp index 85ec5c4..14eee08 100644 --- a/source/plaYUVerApp.cpp +++ b/source/plaYUVerApp.cpp @@ -103,7 +103,7 @@ void plaYUVerApp::open() } - ImageInterface *interfaceChild = new ImageInterface(); //createImageInterface(); + ImageInterface *interfaceChild = new ImageInterface(this); //createImageInterface(); if( interfaceChild->loadFile( fileName ) ) { addImageInterface( interfaceChild );