jd
15th April 2008, 14:53
Hello, i've a problem with my code design. I've read this manual about QVariant: http://doc.trolltech.com/4.3/qvariant.html
Waht is the diffrent between code1 and code2?
code1:
QString CMainWindow::myFunction( QVariant num ) {
QString tmp;
// do something
return tmp;
}
code2:
template <class T> QString CMainWindow::myFunction( T num ) {
QString tmp;
// do something
return tmp;
}
Is code1 the same as code2 only in Qt-Style?
so long
jd
Waht is the diffrent between code1 and code2?
code1:
QString CMainWindow::myFunction( QVariant num ) {
QString tmp;
// do something
return tmp;
}
code2:
template <class T> QString CMainWindow::myFunction( T num ) {
QString tmp;
// do something
return tmp;
}
Is code1 the same as code2 only in Qt-Style?
so long
jd