Originally Posted by
flashmozzg
How? In docs it says:
I just tried this and it creates a dialog that can't be shrunk below its content's size
import QtQuick 2.1
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
Dialog {
id: dialog
title: qsTr("Choose someText")
standardButtons: StandardButton.Ok | StandardButton.Cancel
Row {
id: row
spacing: 5
Label {text: qsTr("this is someText:");anchors.verticalCenter: tf.verticalCenter}
TextField {
id:tf
text: "foo"
}
Label {text: "text2";anchors.verticalCenter: tf.verticalCenter}
}
Component.onCompleted: open()
}
import QtQuick 2.1
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
Dialog {
id: dialog
title: qsTr("Choose someText")
standardButtons: StandardButton.Ok | StandardButton.Cancel
Row {
id: row
spacing: 5
Label {text: qsTr("this is someText:");anchors.verticalCenter: tf.verticalCenter}
TextField {
id:tf
text: "foo"
}
Label {text: "text2";anchors.verticalCenter: tf.verticalCenter}
}
Component.onCompleted: open()
}
To copy to clipboard, switch view to plain text mode
Originally Posted by
flashmozzg
And I can't (don't want to) add this to onAccpeted or whatever signal of dialog because I intend to use this dialog in many cases and I don't need to emit sendSignal every time I use this dialog.
Using the same dialog type does not imply using the same instance.
Any specific reason you want to use the same instance of the dialog?
Cheers,
_
Bookmarks