我有以下代码,当我按“ U”键时会更改点的可见性,我想更改可见性(我按“ Qt :: RightClick”将“ Qt :: Key_u”更改为“ Qt :: Key_u”)右键单击”,但没有用。
QShortcut *keyModifyVisibility = new QShortcut(this);
keyModifyVisibility->setWhatsThis(tr("Modify current visibility"));
keyModifyVisibility->setKey(Qt::Key_U);
connect(keyModifyVisibility, SIGNAL(activated()), this,
SLOT(ModifyVisibility()));