Yes, I actually used both of them, calculated and set the height of the dialog and used the anchors. But I needed to first calculate and set the height manually since otherwise the dialog's height wasn't matching the contents actual height and the content got cropped.
The new code looks like this:
Code:
// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.symbian 1.1
CommonDialog {
titleText: "Enter Coordinates"
content: Column {
id: contentColumn
height: textFieldAltitude.height * 3 + platformStyle.paddingMedium * 4
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: platformStyle.paddingMedium
spacing: platformStyle.paddingMedium
TextField {
id: textFieldAltitude
anchors.left: parent.left
anchors.right: parent.right
placeholderText: "Altitude"
}
TextField {
id: textFieldLatitude
anchors.left: parent.left
anchors.right: parent.right
placeholderText: "Latitude"
}
TextField {
id: textFieldLongitude
anchors.left: parent.left
anchors.right: parent.right
placeholderText: "Longitude"
}
}
buttonTexts: ["OK", "Cancel"]
onButtonClicked: if (index == 0) {
accept();
}
else
{
reject();
}
}