Can I use a QMessagebox in plugin code?
I feel kind of silly asking this because it seems I should be able to figure this out for myself. But I haven't been able to either make it work or definitively determine it's impossible.
I simply wish to pop up a modal dialog box to inform the user if an error has been encountered. This is for a plugin that otherwise has no other user interface components. Meaning that I haven't created any windows. I don't need a user interface, other than informing of errors, so was hoping to be able to just pop up a message if needed.
If anyone can point me at a good .qml example that'd be awesome. OR alternatively inform me that I really will have to create a 'real' main UI window to do this.
import QtQuick 2.2
import QtQuick.Layouts 1.2
import QtQuick.Controls 1.0
import QtQuick.Dialogs 1.1
import MuseScore 3.0
description: "Testing popup message boxes"
menuPath: "Plugins.Popup Message Box
var QMessageBox msgBox; // try this // QMessageBox.critical("", "File Name", "-"); // and try this
Creating component failed
line 43: Unexpected token `identifier'