PDA

View Full Version : cast



mickey
12th July 2006, 11:30
Hi, ineed to do something like this but doesn't compile. is it possible? thanks


int tt=5;
QString x = dynamic_cast<QString> (tt);

jacek
12th July 2006, 12:10
You can use dynamic_cast only to cast a pointer (reference) to base class to a pointer (reference) to derived class.

Use QString::number() instead.