Fix size hint of video subwindows

This commit is contained in:
2015-01-23 17:39:22 +00:00
parent 56e466346b
commit dfa8fbb34e
10 changed files with 59 additions and 20 deletions
+5 -2
View File
@@ -23,6 +23,7 @@
*/
#include "PlaYUVerMdiSubWindow.h"
#include "SubWindowHandle.h"
namespace plaYUVer
{
@@ -34,11 +35,13 @@ PlaYUVerMdiSubWindow::PlaYUVerMdiSubWindow( QWidget *parent ) :
QSize PlaYUVerMdiSubWindow::sizeHint() const
{
QSize sizeHint = widget()->sizeHint();
QSize maxSize;
if( parent() )
maxSize = parentWidget()->size();
QSize sizeHint = qobject_cast<SubWindowHandle*>( widget() )->sizeHint( maxSize );
return sizeHint;
}
Void PlaYUVerMdiSubWindow::closeEvent( QCloseEvent *event )
{
emit aboutToClose( this );