I have a statusbar and I have added two QLabels in the statusbar. I have a callback function and the text I am setting is not showing up. I know my callback functions ok, because if I change the parameter from a QLabel to a QStatusbar the text displays. I am displaying the lat/long in the status bar, but would like to get it to display in my QLabel that is added to the statusbar.

bool
MouseCoordsUtility::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
{
if (ea.getEventType() == ea.MOVE || ea.getEventType() == ea.DRAG)
{
osg::Vec3d world;
if ( m_mapNode->getTerrain()->getWorldCoordsUnderMouse(aa.asView(), ea.getX(), ea.getY(), world) )
{
GeoPoint map;
map.fromWorld( m_mapNode->getMapSRS(), world );

for( Callbacks::iterator i = m_callbacks.begin(); i != m_callbacks.end(); ++i )
i->get()->set( map, aa.asView(), m_mapNode );
}
else
{
for( Callbacks::iterator i = m_callbacks.begin(); i != m_callbacks.end(); ++i )
i->get()->reset( aa.asView(), m_mapNode );
}
}

return false;
}

void MouseCoordsUtilLabelCallback::set(const GeoPoint& mapCoords,osg::View* view, MapNode* mapNode)
{
if(m_label)
{
std::string result;
result = osgEarth::Stringify() << m_formatter->format(mapCoords) << ", " << mapCoords.z();
//result = "This is a test.";
//m_label->showMessage(QString(result.c_str()));
m_label->setText(QString(result.c_str()));
}
}

This is my set function and the function that calls it. Hopefully that will give you some idea.