QtQuick.Controls 2.x context menu for text edit

589 Views Asked by At

Back there, in QtQuick.Controls 1.2 there was a TextField component which (through some arcane magic of inheritance and private implementation details) possessed an EditMenu component which in turn somehow provides the default editing menu on right-click like Copy, Paste etc. The menu itself is not exactly pretty-looking and also styled like for touch screens, but at least it is there to begin with.

Now, how do I get that default context menu using QtQuick.Controls 2.x?

Some suggested me that "adding three menu items isn't that hard" — that's not the answer I'm looking for. I'd rather expect some kind of QQC2.TextFieldWithDefaultMenu component be available out there, but I can't seem to find any in the Qt/KDE/Plasma/Kirigami frameworks.

0

There are 0 best solutions below