Linux X11, qt 4.8.4
Linux X11, qt 4.8.4
Qt Code:
Window { width: 600 height: 400 visible: true MenuBar{ Menu { text: "File" MenuItem { text:"file" } } } Window{ id: window1 width: 600 height: 400 MenuBar{To copy to clipboard, switch view to plain text mode
Then child window appears immediately, but still menu appears in the middle of nowhere.
This code works just fine:
javascript Code:
import QtQuick 1.1 import QtDesktop 0.1 Window { width: 600 height: 400 visible: true MenuBar{ Menu { text: "It does" MenuItem { text:"not appear!!" } } } }To copy to clipboard, switch view to plain text mode
But then two windows appears.
Maybe it's something wrong with my c++ launcher.
Qt Code:
#include <QApplication> #include "qmlapplicationviewer.h" Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer<QApplication> app(createApplication(argc, argv)); QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); viewer.showExpanded(); return app->exec(); }To copy to clipboard, switch view to plain text mode
One window is your viewer, another is the window created by "Window". If you don't want the viewer then use QDeclarativeEngine or don't show the viewer.
travick (23rd January 2013)
Bookmarks