Hello Marble!

The API of the Marble library allows for a very easy integration of a map widget into your application.

Let's prove that with a tiny Hello world-like example: Qt beginners might want to have a look at the Qt Widgets Tutorial to learn more about the details of the code. But this shouldn't be really necessary. For a start we just create a QApplication object and a MarbleWidget object which serves as a window.
By default the MarbleWidget uses the Atlas map theme. However for our first example we choose to display streets. So we set the maptheme id to
OpenStreetMap. We then call QWidget::show() to show the map widget and we call QApplication::exec() to start the event loop. That's all!

include <QtGui/QApplication>

include <marble/MarbleWidget.h>

using namespace Marble;

int main(int argc, char** argv)
{

QApplication app(argc,argv);

// Create a Marble QWidget without a parent
MarbleWidget *mapWidget = new MarbleWidget();