Results 1 to 1 of 1

Thread: frame and video player

  1. #1
    Join Date
    Feb 2012
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default frame and video player

    hi everybody,
    I am doing a simple project where my form consist of a phonon video player and a frame(frame color is initially yellow). The video player is placed inside frame and proper layout is applied so that at runtime when the frame is stretched the video player also resizes.I want to know the mouse click events--- When a frame or video player is clicked (left click with a mouse) the frame color should turn blue and i must be able to full screen that video-player using double-click mouse event also again when double clicked the video player should appear normal,,it should retain the blue color until 1 more click is done on that video player..if 1 more click is done on the same frame -the color should turn yellow 1s again

    Note:All this click events should happen within or inside the video player;wherever the video player might be placed at runtime,can anybody help me!!!! its urgent





    Here is the source code:
    Note:All this click events should happen within or inside the video player;wherever the video player might be placed at runtime..
    I don't know to get the positions x,y or globalPos() for my video player ,can anybody help me!!!!

    void MainWindow::mousePressEvent(QMouseEvent *event)
    {


    if(event->button()==Qt::LeftButton)
    emit signl();

    }
    void MainWindow::signl()
    {
    QPalette palette;
    QBrush brush(QColor(255,0,0,255));
    brush2.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Active, QPalette::Window, brush);
    ui->frame->setPalette(palette);
    ui->frame->setAutoFillBackground(true);


    }
    Last edited by Kethan Kumar; 17th February 2012 at 10:11.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.