Fix SeekStreamDialog sizee
This commit is contained in:
1 parent
ac999efa00
commit
842aa6ea2e
1 file changed
+9
-9
@@ -44,10 +44,8 @@ SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *paren
|
|||||||
setWindowTitle( "Seek Video" );
|
setWindowTitle( "Seek Video" );
|
||||||
|
|
||||||
QFont labelFont;
|
QFont labelFont;
|
||||||
labelFont.setStretch( 110 );
|
|
||||||
QLabel* pcLabel = new QLabel;
|
QLabel* pcLabel = new QLabel;
|
||||||
pcLabel->setText( QString( "Go to frame (0 - %1)" ).arg( pcCurrStream->getFrameNum() - 1 ) );
|
pcLabel->setText( QString( "Go to frame (0 - %1)" ).arg( pcCurrStream->getFrameNum() - 1 ) );
|
||||||
pcLabel->setFont( labelFont );
|
|
||||||
|
|
||||||
m_spinFrameNum = new QSpinBox;
|
m_spinFrameNum = new QSpinBox;
|
||||||
m_spinFrameNum->setMinimumSize( 70, 5 );
|
m_spinFrameNum->setMinimumSize( 70, 5 );
|
||||||
@@ -61,13 +59,14 @@ SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *paren
|
|||||||
dialogButtonOkCancel->setStandardButtons( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
|
dialogButtonOkCancel->setStandardButtons( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
|
||||||
dialogButtonOkCancel->setCenterButtons( false );
|
dialogButtonOkCancel->setCenterButtons( false );
|
||||||
|
|
||||||
QGridLayout* mainLayout = new QGridLayout;
|
QVBoxLayout* verticalLayout = new QVBoxLayout;
|
||||||
mainLayout->addWidget( pcLabel, 0, 0 );
|
QHBoxLayout* horizontalLayout = new QHBoxLayout;
|
||||||
mainLayout->addWidget( m_spinFrameNum, 0, 1 );
|
horizontalLayout->addWidget( pcLabel );
|
||||||
mainLayout->addWidget( dialogButtonOkCancel, 1, 0, 1, 2, Qt::AlignRight );
|
horizontalLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
|
||||||
setLayout( mainLayout );
|
horizontalLayout->addWidget( m_spinFrameNum );
|
||||||
|
verticalLayout->addLayout( horizontalLayout );
|
||||||
setFixedSize( 220, mainLayout->sizeHint().height() );
|
verticalLayout->addWidget( dialogButtonOkCancel, Qt::AlignRight );
|
||||||
|
setLayout( verticalLayout );
|
||||||
|
|
||||||
connect( dialogButtonOkCancel, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
connect( dialogButtonOkCancel, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||||
connect( dialogButtonOkCancel, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
connect( dialogButtonOkCancel, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||||
@@ -75,6 +74,7 @@ SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *paren
|
|||||||
|
|
||||||
Int SeekStreamDialog::runDialog()
|
Int SeekStreamDialog::runDialog()
|
||||||
{
|
{
|
||||||
|
m_spinFrameNum->selectAll();
|
||||||
if( exec() == QDialog::Rejected )
|
if( exec() == QDialog::Rejected )
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in new issue
Block a user