Commit 42179379 authored by Dmitry Suzdalev's avatar Dmitry Suzdalev

Provide sizeHint and set minimum size

svn path=/branches/work/kreversi_rewrite/; revision=581091
parent 4bf31c4f
......@@ -10,12 +10,12 @@ KReversiView::KReversiView( QGraphicsScene* scene, QWidget *parent )
setCacheMode( QGraphicsView::CacheBackground );
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
//setFixedSize( sceneRect().toRect().size() );
setMinimumSize( sizeHint() );
resize( sizeHint() );
}
/*
QSize KReversiView::sizeHint() const
{
return QSize( scene()->width()+8, scene()->height()+8 );
return QSize( (int)scene()->width(), (int)scene()->height() );
}
*/
......@@ -8,6 +8,6 @@ class KReversiView : public QGraphicsView
public:
KReversiView( QGraphicsScene* scene, QWidget *parent );
private:
//virtual QSize sizeHint() const;
virtual QSize sizeHint() const;
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment