PDA

View Full Version : Fullscreen in qml



vinayaka
30th September 2011, 10:44
I used this code to get Full screen in my project.


qView->setResizeMode(QDeclarativeView::SizeRootObjectToVi ew);
showFullScreen();
setCentralWidget(qView);


But the problem is that the buttons like play, options are not seen when we navigate to full screen option(I used animation on those buttons to fall from top to bottom).what can I do i n this ? i tried to set the x, y positions yo those buttons when we click fullscreen options. But it doesn't work properly.

ChrisW67
2nd October 2011, 23:43
what can I do i n this ?
Show us some code/QML pertinent to the positioning and showing of "the buttons". We can only guess otherwise.

vinayaka
3rd October 2011, 07:05
Rectangle{
id:fullScreen
width: fullScreenImage.width
height: fullScreenImage.height
color: "transparent"
x:0;y:50;
Image{
id:fullScreenImage
source: "pics/fullScreenDown.png"
}
MouseArea{
id:fullScreenArea
anchors.fill: fullScreenImage
onPressed: {
fscreen=1;
fullScreenImage.source="pics/fullScreenUp.png"
showhanddown(3)
fullscreen(k)
//playIcon.x=250
//playIcon.y=200
}
onReleased: {
fullScreenImage.source="pics/fullScreenDown.png"
showhanddown(0)
}
}

}





in .cpp


connect (obj,SIGNAL(fullscreen(int)), this, SLOT(showsfullscreen(int)));

void Four_in_a_row::showsfullscreen(int j)
{
qView->setResizeMode(QDeclarativeView::SizeRootObjectToVi ew);
showFullScreen();
setCentralWidget(qView);
}




this code gives me a 'fullscreen '.But I am not able to see the buttons on it.