PDA

View Full Version : qobject_cast



valgaba
18th March 2014, 14:41
Is there any reason why this code works perfectly in windows and in linux failed


void Button::dropEvent(QDropEvent *event){


Button* source = qobject_cast<Button*>(event->source()); // craaaaf Failure only in linux


}


thanks

anda_skoa
18th March 2014, 16:29
What do you mean with "failed"?

Does the qobject_cast return 0?
Is the event->source of type Button*?

Cheers,
_