Fix for empty toolbar issue

This commit is contained in:
Anthony J. Thibault 2017-02-15 16:50:08 -08:00
parent 67302cbd2b
commit 03b6280ed0
3 changed files with 5 additions and 4 deletions

View file

@ -125,9 +125,6 @@ Window {
}
function addButton(properties) {
visible = true;
properties = properties || {}
// If a name is specified, then check if there's an existing button with that name

View file

@ -14,6 +14,7 @@
#include "DependencyManager.h"
#include <PathUtils.h>
#include <QmlWindowClass.h>
#include <QQmlProperty>
#include <RegisteredMetaTypes.h>
#include "ScriptEngineLogging.h"
#include <OffscreenUi.h>
@ -543,6 +544,9 @@ void TabletProxy::addButtonsToToolbar() {
qCWarning(scriptengine) << "ToolbarProxy addButton has no result";
}
}
// make the toolbar visible
QMetaObject::invokeMethod(toolbarProxy, "writeProperty", Qt::AutoConnection, Q_ARG(QString, "visible"), Q_ARG(QVariant, QVariant(true)));
}
void TabletProxy::removeButtonsFromToolbar() {

View file

@ -173,7 +173,7 @@ signals:
void fromQml(QVariant msg);
/**jsdoc
* Signales when this tablet screen changes.
* Signaled when this tablet screen changes.
* @function TabletProxy#screenChanged
* @param type {string} - "Home", "Web", "Menu", "QML", "Closed"
* @param url {string} - only valid for Web and QML.