diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/qtdemo/menumanager.cpp | 6 | ||||
-rw-r--r-- | demos/qtdemo/qmlShell.qml | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index a2ceb0e..15561ab 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -369,10 +369,10 @@ void MenuManager::launchQmlExample(const QString &name) dir = QDir(QLibraryInfo::location(QLibraryInfo::DemosPath)); else dir = QDir(QLibraryInfo::location(QLibraryInfo::ExamplesPath)); - QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml"); + QFile file(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml"); if(!file.exists()){ - //try main.qml as well - file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + "main.qml"); + //try dirname.qml as well + file.setFileName(dir.path() + "/" + dirName + "/" + fileName + "/" + fileName.split('/').last() + ".qml"); if(!file.exists()){ exampleError(QProcess::UnknownError); return; diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml index 5c5f96c..e15d33c 100644 --- a/demos/qtdemo/qmlShell.qml +++ b/demos/qtdemo/qmlShell.qml @@ -99,6 +99,7 @@ Item { } MouseArea{ anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton onClicked: loader.focus=true;/* and don't propogate to the 'exit' area*/ } @@ -130,7 +131,7 @@ Item { textFormat: Text.RichText //Note that if loader is Error, it is because the file was found but there was an error creating the component //This means either we have a bug in our demos, or the required modules (which ship with Qt) did not deploy correctly - text: "The example has failed to load.<br />If you installed Qt's QML modules this is a bug!<br />" + text: "The example has failed to load.<br />If you installed all Qt's C++ and QML modules then this is a bug!<br />" + 'Report it at <a href="http://bugreports.qt.nokia.com">http://bugreports.qt.nokia.com</a>'; onLinkActivated: Qt.openUrlExternally(link); } @@ -145,6 +146,7 @@ Item { z: 8 enabled: main.show hoverEnabled: main.show //To steal focus from the buttons + acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton anchors.fill: parent onClicked: main.show=false; } |