Fix tooltip to be compatible with Qt 5.14

This commit is contained in:
Marcus Huderle 2022-09-27 18:43:17 -05:00
parent c2e4fcde8f
commit 1439599079

View file

@ -208,9 +208,9 @@ void Prefab::updatePrefabUi(Map *map) {
parentFrame->layout()->addWidget(frame);
// Clicking on the prefab graphics item selects it for painting.
QObject::connect(frame->ui->graphicsView_Prefab, &ClickableGraphicsView::clicked, [this, item](QMouseEvent *event){
QObject::connect(frame->ui->graphicsView_Prefab, &ClickableGraphicsView::clicked, [this, item, frame](QMouseEvent *event){
selector->setPrefabSelection(item.selection);
QToolTip::showText(event->globalPosition().toPoint(), "Selected prefab!", nullptr, {}, 1000);
QToolTip::showText(frame->ui->graphicsView_Prefab->mapToGlobal(event->pos()), "Selected prefab!", nullptr, {}, 1000);
});
// Clicking the delete button removes it from the list of known prefabs and updates the UI.