Setting up UI for movie player



  • I am designing an application similar to movie player Basically it plays frames one after another.So i wanted five buttons one to play next to move to next frame next to move to previous frame and one to move to first and last frame

    @QHBoxLayout *horizontal = new QHBoxLayout(m_frame);@
    @horizontal->setAlignment(Qt::AlignCenter|Qt::AlignBottom);@
    @horizontal->addStretch();@

    @playbutton=new pushbutton;@
    @playbutton->setMove(false);@
    @playbutton->setIcon(QIcon("images/movieplay.png"));@
    @playbutton->setIconSize( QSize(50,50));@
    @/playbutton->setStyleSheet("QPushButton{background-color:gray }");@

    @QRegion* region = new QRegion(*(new QRect(playbutton->x()+5,playbutton->y()+5,52,52)),QRegion::Ellipse);@
    @playbutton->setMask(*region);@
    @connect(playbutton,SIGNAL(pressed()),this,SLOT(playcine()));@

    @pushbutton *nextbutton=new pushbutton;@
    @nextbutton->setMove(false);@
    @nextbutton->setIcon(QIcon("images/movienextframe.png"));@
    @nextbutton->setIconSize( QSize(50,50));@

    @pushbutton *prevbutton=new pushbutton;@
    @//prevbutton->setStyleSheet("QPushButton{background-color:gray }");@
    @prevbutton->setMove(false);@
    @prevbutton->setIcon(QIcon("images/moviefirstframe.PNG"));@
    @prevbutton->setIconSize( QSize(50,50));@

    @pushbutton *firstbutton=new pushbutton;@
    @firstbutton->setMove(false);@
    @/ firstbutton->setStyleSheet("QPushButton{background-color:gray }");@
    @firstbutton->setIcon(QIcon("images/moviefirstframe.PNG"));@
    @firstbutton->setIconSize( QSize(50,50));@
    @pushbutton *lastbutton=new pushbutton;@
    @lastbutton->setMove(false);@
    /@/lastbutton->setStyleSheet("QPushButton{background-color:gray }");@
    @lastbutton->setIcon(QIcon("images/movielastframe.PNG"));@
    @lastbutton->setIconSize( QSize(50,50));@

    @horizontal->addWidget((QWidget *)firstbutton);@
    @horizontal->addWidget((QWidget *)prevbutton);@

    @horizontal->addWidget((QWidget *)playbutton);@
    @horizontal->addWidget((QWidget *)nextbutton);@
    @horizontal->addWidget((QWidget *)lastbutton);@
    @horizontal->addStretch();@
    @horizontal->setSpacing(0);@

    Pushbutton is inherited from Qpushbutton..I wanted something like windows photoViewer



  • And what is the question?



  • How can I set up the button shapes like d shape of picture viewer..it there any widget similar to it?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.