Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 Support (Qt 5) › Dialog cannot be resized

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #12457


    The Felgo Dialog type is too small for many use cases and, as far as I can tell, exposes no way to set its size. It would be more useful if it exposed properties with which I can control the size of the content area of the dialog.

    Is there a way to resize the dialog and I’m just missing it?


    Felgo Team

    Hi Nathan!

    I just had a look at our implementation of the Dialog – at the moment the content area size is always based on the app-window size.
    But there are already two hidden properties that handle the width and height of the dialog’s content area: contentWidth and contentHeight.
    You can use these properties for now to modify the size, for example like this:

    AppButton {
      text: "Custom Dialog"
      onClicked: customDialog.open()
    Dialog {
      id: customDialog
      title: "Change Dialog Size?"
      positiveActionLabel: "Yes"
      negativeActionLabel: "No"
      onCanceled: close()
      onAccepted: image.height = image.height === dp(200) ? dp(50) : dp(200)
      // base the content area height (without dialog title and buttons) on the image height
      contentHeight: image.height 
      AppImage { //will be placed inside the dialogs content area
        id: image
        height: dp(50)
        anchors.horizontalCenter: parent.horizontalCenter
        source: "../assets/vplay-logo.png"
        fillMode: Image.PreserveAspectFit



    • This reply was modified 8 years ago by  GT.
    • This reply was modified 8 years ago by  GT.


    Yep, that works great. Thanks!

    One other thing I note, though. In the default dialog, the “OK” button text is much smaller than the “Cancel” button text. I’m assuming that’s unexpected behavior? Screenshot here: http://ge.tt/5qZ0pzX2


    Felgo Team

    I agree that the button text sizes should match for the dialog to look good 😉
    Unfortunately I can’t reproduce this issue – which device/platform are you using, or do you apply any special styling settings?



    I can’t reproduce it in a trivial demo app either, but I note that the trivial demo app uses the whole canned Felgo qmake project whereas my project uses qbs and may be missing some of the infrastructure the project templates have?

    Testing on Linux, with a 15″ 4k display (perhaps the high DPI is causing some fits?)

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded