I accidentaly use this code
if (o
== lineDeNo
&& e
->type
() == QEvent::KeyPress) { const QKeyEvent *ke
= static_cast<QKeyEvent
*>
(e
);
}
if (o
== lineMa
&& e
->type
() == QEvent::KeyPress) { const QKeyEvent *ke
= static_cast<QKeyEvent
*>
(e
);
lineMa->setText(ks.toString());
}
if (o == lineDeNo && e->type() == QEvent::KeyPress) {
const QKeyEvent *ke = static_cast<QKeyEvent *>(e);
const QKeySequence ks(ke->modifiers() + ke->key());
lineDeNo->setText(ks.toString(QKeySequence::NativeText));
}
if (o == lineMa && e->type() == QEvent::KeyPress) {
const QKeyEvent *ke = static_cast<QKeyEvent *>(e);
const QKeySequence ks(ke->modifiers() + ke->key());
lineMa->setText(ks.toString());
lineDeNo->setText(ks.toString(QKeySequence::PortableText));
}
To copy to clipboard, switch view to plain text mode
When editting lineDoNo it doesnt work but When I edit lineMa, lineDeNo works fine,
I try
if (o
== lineDeNo
&& e
->type
() == QEvent::KeyPress) { const QKeyEvent *ke
= static_cast<QKeyEvent
*>
(e
);
}
if (o == lineDeNo && e->type() == QEvent::KeyPress) {
const QKeyEvent *ke = static_cast<QKeyEvent *>(e);
const QKeySequence ks(ke->modifiers() + ke->key());
lineDeNo->setText(ks.toString(QKeySequence::PortableText));
}
To copy to clipboard, switch view to plain text mode
but it doesnt work...
Bookmarks