Reputation: 23
I have a very simple setup just to exemplify the problem:
import QtQuick.Controls 1.4
import QtQuick.Window 2.2
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
menuBar:MenuBar{
Menu{
id:mainmenu
title:"&File"
MenuItem{action: settingsAction}
}
}
Action {
id: settingsAction
text: "Settings"
iconName: "icon-settings"
iconSource: "qrc:///images/images/cog.png"
}
Button{
text:"Push"
iconSource: "qrc:///images/images/cog.png"
anchors.centerIn: parent
}
}
As you ca see, the button and the menu item has the same url as iconSource. The button shows the image, but the menu item doesn't.
Can you please tell me what i'm doing wrong here?
Thank you.
Upvotes: 2
Views: 1879
Reputation: 13701
Indeed the problem of yours is a bug that is already know, but as QtQuick.Controls 1.x
is not maintained any more, I don't know if it will ever be fixed (unless it is a bug in QtGuiApplication?)
As described in the bugreport, you may use QApplication
instead of QGuiApplication
in your main to have it shown.
What you are doing wrong?
Nothing. It's all QT's fault.
Upvotes: 3