I want to get the mouse-position within a document. How can I do this? I tried this:
Code: Select all
include('scripts/EAction.js');
function Test(guiAction) {
EAction.call(this, guiAction);
}
Test.prototype = new EAction();
Test.prototype.beginEvent = function() {
EAction.prototype.beginEvent.call(this);
};
Test.prototype.mouseMoveEvent = function(event) {
qDebug(event.getScreenPosition());
}
Test.init = function(basePath) {
var action = new RGuiAction('Test', RMainWindowQt.getMainWindow());
action.setRequiresDocument(true);
action.setGroupSortOrder(100000);
action.setSortOrder(0);
action.setWidgetNames(['MiscModifyMenu']);
};