Mint87
5th February 2013, 16:11
Hi everyone!
I am having trouble with conneting two signals.
I have WindowsMenu and there is PlotBackgroundMenuinside.
BackgroundColorChanged(CPlotBackgroundMenu::Backgr oundColor color) signal is emited in PlotColorMenu (Color is enum) when one of the menu's actions is trigged.
I did following in WindowMenu:
void CWindowsMenu::makeConnections()
{
connect(PlotBackgroundMenu,SIGNAL(BackgroundColorC hanged(CPlotBackgroundMenu::BackgroundColor)),
this,SIGNAL(BackColorChanged(CPlotBackgroundMenu:: BackgroundColor)));
}
and I called makeConnections() in WindowMenu constractor.
Then I used the signal BackColorChanged in MainWindow to connect it with the slot to actually change the color.
It didn't work.
What am I missing?
P.S. I read QWidget references and searched for examples, still don't get it :(
Thank you!
I am having trouble with conneting two signals.
I have WindowsMenu and there is PlotBackgroundMenuinside.
BackgroundColorChanged(CPlotBackgroundMenu::Backgr oundColor color) signal is emited in PlotColorMenu (Color is enum) when one of the menu's actions is trigged.
I did following in WindowMenu:
void CWindowsMenu::makeConnections()
{
connect(PlotBackgroundMenu,SIGNAL(BackgroundColorC hanged(CPlotBackgroundMenu::BackgroundColor)),
this,SIGNAL(BackColorChanged(CPlotBackgroundMenu:: BackgroundColor)));
}
and I called makeConnections() in WindowMenu constractor.
Then I used the signal BackColorChanged in MainWindow to connect it with the slot to actually change the color.
It didn't work.
What am I missing?
P.S. I read QWidget references and searched for examples, still don't get it :(
Thank you!