Buttons become transparent over images using Material Style
-
I want my application to use an image as a Background. So I use this code:
In my ApplicationWindow:
Image { id: bkgImage source: "qrc:/images/bkg.jpg" anchors.centerIn: parent }
To add a button
Button { id: btnAsistencia text: qsTr("ASISTENCIA") font.pixelSize: fhButttonTextSize anchors.horizontalCenter: parent.horizontalCenter anchors.top: btnInscripcion.bottom anchors.topMargin: parent.height*0.1 }
The code above is for the second button, but I added one before in the exact same way. This is the result:
The second button becomes transparent over the image. How can I prevent this?
-
I want my application to use an image as a Background. So I use this code:
In my ApplicationWindow:
Image { id: bkgImage source: "qrc:/images/bkg.jpg" anchors.centerIn: parent }
To add a button
Button { id: btnAsistencia text: qsTr("ASISTENCIA") font.pixelSize: fhButttonTextSize anchors.horizontalCenter: parent.horizontalCenter anchors.top: btnInscripcion.bottom anchors.topMargin: parent.height*0.1 }
The code above is for the second button, but I added one before in the exact same way. This is the result:
The second button becomes transparent over the image. How can I prevent this?
@aarelovich you can customize the background of your Button
https://doc.qt.io/qt-5.9/qtquickcontrols2-customize.html#customizing-button -
I ended up doing that, but I wanted to use the standard colors for the Material.Dark Theme. Thanks for the reply.
-
I ended up doing that, but I wanted to use the standard colors for the Material.Dark Theme. Thanks for the reply.
@aarelovich please open a bug report
-
@aarelovich please open a bug report
I don't understand, what exactly is the bug here? Just because something does not behave like I'd like, it is not necessarily a bug, right?
-
I don't understand, what exactly is the bug here? Just because something does not behave like I'd like, it is not necessarily a bug, right?
@aarelovich then I misunderstood. thought it's not working as expected from Google Material Guidelines.
-
@aarelovich then I misunderstood. thought it's not working as expected from Google Material Guidelines.
@ekkescorner Ok, that might be. Thanks!