in this program i'm writing the functions that have qt classes as parameters Qlabel, QSpinbox, etc. are causing compile errors, my other functions work fine
i get the same 2 errors for each QT object i use as an argument
this is the function definition that uses QT classes as 3 of the parameters the first isnt
void fraction::displayfraction(fraction toDis, QLabel nWhole, QLabel nNum, QLabel nDen)
{
nWhole.setText(QString::number(toDis.Whle()));
nNum.setText(QString::number(toDis.Num()));
nDen.setText(QString::number(toDis.Den()));
}
this is a test function call that causes the error
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
fraction myfraction(7,4,5);
QLabel d;
QLabel n;
QLabel w;
/*error function*/myfraction.displayfraction(myfraction,w,n,d);
}
i get the same 2 errors for each QT object i use as an argument
C:\Users\James\programs\FrctnCltrV3-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release\..\..\..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui\qlabel.h:165: error: 'QLabel::QLabel(const QLabel&)' is private
C:\Users\James\programs\FrctnCltrV3-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release\..\FrctnCltrV3\mainwindow.cpp:14: error: initializing argument 2 of 'void fraction::displayfraction(fraction, QLabel, QLabel, QLabel)'
i'm 17 and kinda new to programming so the solution could be obvious, i might not find it