Message Dialog error on SetGeometry.
-
wrote on 4 Jul 2014, 09:15 last edited by
I have a Message Dialog with several StandardButtons, and I get an error:
setGeometry: Attempt to set a size (354x87) violating the constraints(354x162 - 16777215x16777215) on window QQuickWindow/''.That dont happen on the other MessageDialogs with only one button.
Any suggestions?
@
MessageDialog{
id:newProject;
width: app.width/5;
height: app.height/5;
icon: StandardIcon.Warning;
title: qsTr("Warning!");
text: qsTr("Do you want to start a new project? All your translations will be deleted in the work file window.");
standardButtons: StandardButton.Cancel | StandardButton.Yes | StandardButton.No | StandardButton.Save;onAccepted: { if(app.savedAsBool){ app.saved = true;
// app.quitBool = true;
masterResource.saveTranslation(saveAsFile.saveFileName);
}
else if(app.madeList && !app.savedAsBool)
{
fileNameMust = masterResource.fileName;
warningSave.open();
}
else{
noListDialog.open();
}
}
onYes: {
englishTxt.text = "";
langInput.text = "";
masterResource.clearTranslations();
}onNo: close(); onRejected: console.log("Canceled"); }
@
-
Is the messageDialog is within some QML Layout ? What are the constraints inside the layout ? What are constraints of object with id - app ?
Program above looks simple enough and should not cause issue like this.
-
wrote on 7 Jul 2014, 05:39 last edited by
Thanks for reply.
Yes. The message dialog is inside an applicationWindow called app.
Heres how app looks like at the beginning:@
ApplicationWindow {
id:app
visible:true;
title: qsTr("TransEd");
width: 1200;
height: 800;
minimumHeight: 400;
minimumWidth: 600;//all of my code, including the messageDialog.
}@
-
wrote on 26 Sept 2014, 10:00 last edited by
Hi, any luck on this?
I'm facing the same issue using Qt 5.3.2. The same code had no problem in Qt 5.2.1, but now the dialog window seems to hang on Windows. If I move the window a bit, then it suddenly refreshes, and I may click the buttons.On 5.2.1, the window looked much nicer as well.
I have searched, but could not find a bugreport mentioning this.