<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv1228930206">Hi,<br><br>I have a marble widget along with a MarbleControlBox, as in the following code. I'd like to set the theme to "plain" but instead the Atlas theme shows. Is there a way to set the theme of a marble widget programmatically when using the Control Box (It works fine without it)?<br><br>Here's the code<br><br><br>#include "marble/MarbleWidget.h"<br>#include "marble/MarbleControlBox.h"<br>#include "marble/MapThemeManager.h"<br>#include <QtGui><br><br>using namespace Marble;<br><br><br>int main(int argc, char *argv[])<br>{<br> QApplication app(argc, argv);<br><br> QVBoxLayout *vlayout = new QVBoxLayout();<br> vlayout->setMargin(0);<br><br> QSplitter* m_splitter = new QSplitter ();<br> vlayout->addWidget( m_splitter
);<br><br> MarbleControlBox* m_control = new
MarbleControlBox();<br> m_splitter->addWidget( m_control );<br> m_splitter->setStretchFactor(m_splitter->indexOf(m_control), 0);<br><br> MarbleWidget* m_marbleWidget = new MarbleWidget();<br> m_marbleWidget->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,<br> QSizePolicy::MinimumExpanding ) );<br><br> m_splitter->addWidget( m_marbleWidget );<br> m_splitter->setStretchFactor(m_splitter->indexOf(m_marbleWidget), 1);<br><br> m_control->addMarbleWidget( m_marbleWidget );<br><br> MapThemeManager*
m_mapThemeManager = new MapThemeManager;<br><br> app.processEvents();<br><br> m_control->setMapThemeModel( m_mapThemeManager->mapThemeModel() );<br><br> m_control->updateMapThemeView();<br><br> // Why does this line not work?<br> m_marbleWidget->setMapThemeId("earth/plain/plain.dgml");<br><br> m_splitter->show();<br><br> app.exec();<br>}<br><br><br>Any help would be greatly appreciated.<br>Thanks!<br><br>Eli<br></div></td></tr></table><br>