Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Setting up UI for movie player

Setting up UI for movie player

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 976 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ankush205
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      And what is the question?

      Greetz, Jeroen

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ankush205
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved