Hi,
thanks a lot for your valuable hint! Think, I now understand your design that decouples the way the color is determined on the QWizardPage subclass VisualPropertiesPage from the use of the value in the QWizard subclass GraphWizard's accept() method. So I added this simple connect statement in the GraphWizard's constructor (must admit that in between I renamed lineColor to penColor:-):
connect(ui
->visualPropertiesPage,
SIGNAL(penColorSet
(QColor)),
this,
SLOT(setPenColor
(QColor)));
connect(ui->visualPropertiesPage, SIGNAL(penColorSet(QColor)), this, SLOT(setPenColor(QColor)));
To copy to clipboard, switch view to plain text mode
and in the VisualProperties class's slot method on_penColorBtn_clicked I added an emit statement that emits the
penColorSet(QColor &color)
To copy to clipboard, switch view to plain text mode
signal. All this works now like a charm and I gained some better understanding of good design with Qt!
Bookmarks