문제

import QtQuick 2.0
import QtQuick.Controls 1.0

Item {
  MenuBar {
    id: ee
    Menu {
        title: "File"
        MenuItem { text: "Open..." }
        MenuItem { text: "Close" }
    }

    Menu {
        title: "Edit"
        MenuItem { text: "Cut" }
        MenuItem { text: "Copy" }
        MenuItem { text: "Paste" }
    }
  }
}

I hoped to see a menubar as an output, but I got nothing. Please point out what did I miss.

도움이 되었습니까?

해결책

You need ApplicationWindow. See example there

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top