Sample code:
Code:
#include <QApplication>
#include <QMaemo5KineticScroller>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QPen>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
/* In theory default pen should be visible on the dark background */
QPen pen(QColor(255, 255, 255, 255));
QGraphicsScene scene;
scene.setSceneRect(0.0, 0.0, 1000.0, 1000.0);
scene.addLine(0.0, 0.0, 1000.0, 1000.0, pen);
scene.addLine(1000.0, 0.0, 0.0, 1000.0, pen);
/* QGraphicsView::alignment is Qt::AlignCenter by default, but scene still
is not centered in view */
QGraphicsView view(&scene);
QMaemo5KineticScroller scroll(&view);
view.show();
return app.exec();
}