here is one of my widgets
.h file
{
public:
//constructor
//declaration of private methods
string peg;
protected:
};
#endif
class Decode : public QWidget
{
public:
//constructor
Decode(QWidget *parent = 0);
//declaration of private methods
void decodepeg(QHBoxLayout *layout);
string peg;
protected:
void paintEvent(QPaintEvent *event); //PaintEvent
};
#endif
To copy to clipboard, switch view to plain text mode
.cpp file
{
decodepeg(layout);
decodepeg(layout);
decodepeg(layout);
decodepeg(layout);
}
{
string pegs;
Peg *peg = new Peg();
cout<<"Choose a color for the SecretCode Pegs"<<endl;
cin>>pegs;
peg->colour(pegs);
layout -> addWidget(peg);
}
Decode::Decode(QWidget *parent):QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(parent);
decodepeg(layout);
decodepeg(layout);
decodepeg(layout);
decodepeg(layout);
}
void Decode::decodepeg(QHBoxLayout *layout)
{
string pegs;
Peg *peg = new Peg();
cout<<"Choose a color for the SecretCode Pegs"<<endl;
cin>>pegs;
peg->colour(pegs);
layout -> addWidget(peg);
}
To copy to clipboard, switch view to plain text mode
I'm getting an error at this part
mainwindow.
secretFrame->secret
(QWidget *parent
);
mainwindow.
boardFrame->decode
(QWidget *parent
);
mainwindow.
pickerFrame->pick
(QWidget *parent
);
mainwindow.secretFrame->secret(QWidget *parent);
mainwindow.boardFrame->decode(QWidget *parent);
mainwindow.pickerFrame->pick(QWidget *parent);
To copy to clipboard, switch view to plain text mode
of the main.cpp file
Bookmarks