You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, April 18th 2010, 2:01pm

matching function for call to qobject_cast

Dear programmers
I have a problem:
I've written this code that "ISITextCursor " is a class which inherits from QTextCursor and I wanted to add new features to it.and now I want to cast my textEdit's cursor to it. How would that be possible. Because I face with this error:
matching function for call to qobject_cast
I really appreciate to help me.

void MytextEdit::copyImage()
{

ISITextCursor *tc =qobject_cast<ISITextCursor *>(this->textCursor());
tc->select(ISITextCursor::CharacterUnerCursor);
this->copy();

}