You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have cloned the dev repository, and installed successfully qml-material under Qt 5.7. The demo works great. But when I use Dialog component exactly as in the demo but on an ApplicationWindow, it doesn't work properly. When I click outside the dialog it doesn't close, and more important the buttons appear to be above the dialog. Here is the code (almost dialogDemo.qml) and a screenshot:
Well it took me around 14 hours of not stop debugging, but I think I finally figured it out. You need to use a page stack or this won't work as expected. I have no idea why the library sets it up like this, and it can't just be a simple "last element loaded get's rendered at the top", but whatever. Basically if you run the main.qml file in the demo folder, it will work as expected. If you get rid of as much as possible you end up with a file like this:
afaik, that's the minimum you can do to have the dialog example work as expected. I still have not figured out the internals of why a pagestack is used, but at least we know what to do to make it work :p
Hi, I have cloned the dev repository, and installed successfully qml-material under Qt 5.7. The demo works great. But when I use Dialog component exactly as in the demo but on an ApplicationWindow, it doesn't work properly. When I click outside the dialog it doesn't close, and more important the buttons appear to be above the dialog. Here is the code (almost dialogDemo.qml) and a screenshot:
`import QtQuick 2.4
import QtQuick.Controls 1.3 as QuickControls
import Material 0.2
import Material.Extras 0.1
ApplicationWindow{
visible: true
width: 640
height: 480
Item {
anchors.fill: parent
Dialog {
id: alertNoTitleBar
width: 300
text: "Discard draft?"
hasActions: true
positiveButtonText: "discard"
negativeButtonText: "cancel"
}
}
`
The text was updated successfully, but these errors were encountered: