Thank you for reply.
First is same I did.
I've also tried the second before
bool Edytor
::canInsertFromMimeData (const QMimeData*){ qDebug()<<"CanInsert";
return false;
};
void Edytor
::insertFromMimeData (QMimeData*){ qDebug()<<"Insert";
return;
};
bool Edytor::canInsertFromMimeData (const QMimeData*){
qDebug()<<"CanInsert";
return false;
};
void Edytor::insertFromMimeData (QMimeData*){
qDebug()<<"Insert";
return;
};
To copy to clipboard, switch view to plain text mode
But it doesn't work too.
I checked qt source code.
{
d->control->paste();
}
void QTextEdit::paste()
{
Q_D(QTextEdit);
d->control->paste();
}
To copy to clipboard, switch view to plain text mode
d is instance of QTextEdit.
Line d->control->paste() invokes paste method of QTextControl class.
Which looks like below:
void QTextControl::paste()
{
if (md)
insertFromMimeData(md);
}
void QTextControl::paste()
{
const QMimeData *md = QApplication::clipboard()->mimeData();
if (md)
insertFromMimeData(md);
}
To copy to clipboard, switch view to plain text mode
It invokes insertFromMimeData(QMimeData *src) but not from QTextEdit but from QTextControl to which I have no access.
Am I wrong somewhere?
Bookmarks