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:
Qt Code:
  1. QString CMainWindow::myFunction( QVariant num ) {
  2. QString tmp;
  3. // do something
  4.  
  5. return tmp;
  6. }
To copy to clipboard, switch view to plain text mode 

code2:
Qt Code:
  1. template <class T> QString CMainWindow::myFunction( T num ) {
  2. QString tmp;
  3. // do something
  4.  
  5. return tmp;
  6. }
To copy to clipboard, switch view to plain text mode 

Is code1 the same as code2 only in Qt-Style?

so long

jd