Код: Выделить всё
std::shared_ptr m_selectedShape = nullptr;
std::shared_ptr m_copiedShape = nullptr;
Код: Выделить всё
...
else if ((event->key() == Qt::Key_C) && (event->modifiers() == Qt::ControlModifier)){
if(m_selectedShape != nullptr){
m_copiedShape = m_selectedShape;
}
update();
}
else if ((event->key() == Qt::Key_V) && (event->modifiers() == Qt::ControlModifier)){
if(m_copiedShape != nullptr){
//How?
}
update();
}
...
Подробнее здесь: https://stackoverflow.com/questions/785 ... ses-abstra
Мобильная версия