thanks, but that was the last thing I tried yesterday.
Still, it doesn't work. (see output below)
bool PluginConfig::applyChanges()
{
qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << m_wdgtStack->currentIndex() << m_wdgtStack->count();
ConfigWidget* wdgt = qobject_cast<ConfigWidget*>(m_wdgtStack->currentWidget());
if(wdgt)
return wdgt->applyChanges();
else{
qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "no widget in stack?";
wdgt = static_cast<ConfigWidget*>(m_wdgtStack->widget(m_wdgtStack->currentIndex()));
if(wdgt)
return wdgt->applyChanges();
else
return false;
}
}
bool PluginConfig::applyChanges()
{
qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << m_wdgtStack->currentIndex() << m_wdgtStack->count();
ConfigWidget* wdgt = qobject_cast<ConfigWidget*>(m_wdgtStack->currentWidget());
if(wdgt)
return wdgt->applyChanges();
else{
qDebug() << __FILE__ << __LINE__ << __FUNCTION__ << "no widget in stack?";
wdgt = static_cast<ConfigWidget*>(m_wdgtStack->widget(m_wdgtStack->currentIndex()));
if(wdgt)
return wdgt->applyChanges();
else
return false;
}
}
To copy to clipboard, switch view to plain text mode
configdialog.cpp 73 apply
pluginconfig.cpp 35 applyChanges 0 3
pluginconfig.cpp 40 applyChanges no widget in stack?
alsaconfig.cpp 41 applyChanges
configdialog.cpp 73 apply
pluginconfig.cpp 35 applyChanges 0 3
pluginconfig.cpp 40 applyChanges no widget in stack?
alsaconfig.cpp 41 applyChanges
To copy to clipboard, switch view to plain text mode
I hadforgotten to include the Q_OBJECT
but after I included it I run a
$>qmake -recursive; make clean; clear; make
just to make sure.
Any other ideas?
I read a bit in "Thinking in C++" and if I got that right, the static_cast<> only allows me to downcast within the hierarchy. That would be alright then.
Bookmarks