Reputation: 158
I was using this dialog as message pop up and i want to hide the title bar Is there any way to hide title bar of Dialog?
import QtQuick 2.7
import QtQuick.Controls 2.2
Dialog {
standardButtons: DialogButtonBox.Ok
property alias text : textContainer.text
Text {
id: textContainer
anchors.fill: parent
horizontalAlignment: Qt.AlignLeft
verticalAlignment: Qt.AlignTop
}
}
Upvotes: 1
Views: 2531
Reputation: 2168
You could always use Popup { }
instead of Dialog { }
to get a modeless popup box.
See documentation on Popup
https://doc.qt.io/qt-5.10/qml-qtquick-controls2-popup.html
Also change the second line to QtQuick.Controls 2.3
Upvotes: 2