How to display screen full of Images?
General and Desktop
2
Posts
2
Posters
937
Views
1
Watching
-
wrote on 28 Mar 2013, 14:19 last edited by
A very very basic and naive question.. How to display four images on the screen which span the entire window..?
I want to create a game UI, which has cartoon Images on the front.. there might 3-4 four of them, and on top of that two buttons to play and help.
Play button would then create a OpenGL context (onclick) and Game Engine would start.
Is this right way to go..?
Any code to display Images..?(No theory please.. code speaks a lot louder)
-
wrote on 28 Mar 2013, 15:05 last edited by
In C++ or in QML?
In C++ is something like this:
@SelectionWidget::SelectionWidget(QWidget* parent):
QWidget(parent)
{
setWindowState(Qt::WindowFullScreen);QGridLayout gridLayout = new QGridLayout; gridLayout->setSpacing(0); // or the value you need gridLayout->setMargins(0); // or the value you need // Here you have to initialize 4 QLabels with your images // do not forget to call QLabel::setScaleableContents(true) gridLayout->addWidget( label1, 0, 0 ); gridLayout->addWidget( label2, 1, 0 ); gridLayout->addWidget( label3, 0, 1 ); gridLayout->addWidget( label4, 1, 1 ); setLayout(gridLayout);
}@
2/2