PDA

View Full Version : frame and video player



Kethan Kumar
17th February 2012, 10:38
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);


}