I'm writing a marine navigation app. I am a Qt5 and Marble newbie, but this was working so well, until I hit this block.
It uses MarbleWidget as a way of displaying outputs from the application, closely modelled on an example application supplied with Marble.
When I ported this to Qt5 at recent releases (opensuse), 5.14.0, it stopped working properly - it will no longer exit the application by clicking on the x button in the top right of the title bar.
This behaviour is exhibited by the sample code supplied with Marble as well.
Here is the sample application:
#include <QtWidgets/QApplication>
#include <marble/MarbleWidget.h>
#include <marble/GeoPainter.h>
using namespace Marble;
class MyMarbleWidget : public MarbleWidget
{
public:
virtual void customPaint(GeoPainter* painter);
};
void MyMarbleWidget::customPaint(GeoPainter* painter)
{
GeoDataCoordinates home(8.4, 49.0, 0.0, GeoDataCoordinates::Degree);
painter->setPen(Qt::green);
painter->drawEllipse(home, 7, 7);
painter->setPen(Qt::black);
painter->drawText(home, "Hello Marble!");
}
int main(int argc, char** argv)
{
QApplication app(argc,argv);
MyMarbleWidget *mapWidget = new MyMarbleWidget;
mapWidget->setMapThemeId("earth/openstreetmap/openstreetmap.dgml");
mapWidget->show();
return app.exec();
}
and my Makefile is:
all: pre bld post
bld: quick_marble.x
quick_marble.x : quick_marble.cpp
g++ -g -fpic -I /usr/include/qt5/ -I/usr/include/qt5/QtWidgets \
-I/usr/include/qt5/QtGui \
-I/usr/include/qt5/QtCore \
-o quick_marble.x \
quick_marble.cpp \
-L/usr/local/lib64 -lmarblewidget-qt5 -lQt5Core -lQt5Widgets -lQt5Gui
pre :
rm -f *.x
rm -f *.list
post :
ldd quick_marble.x >quick_marble.modules.list
echo all done
I have tried some work-arounds, but nothing seems to solve this issue.
I have posted the issue in a marble forum, but it hasn't been looked at for several months.
Any ideas to move forward would be helpful.