Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › Many Felgo components do not work well in Layouts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12484

    Nathan

    For example:

    RowLayout {
      width: parent.width
      IconButton { ... }
      IconButton { ... }
      AppText {
        Layout.fillWidth: true
        text: "Let there be characters!"
      }
    }

    The layout will not size things correctly. I believe this is due to the fact that the IconButtons do not set their implicitWidth correctly, but rather just set width which is not respected by RowLayout. This workaround does work, because Row respects its children’s width properties and yields an implicitWidth to the RowLayout:

    RowLayout {
      width: parent.width
      Row {
        IconButton { ... }
        IconButton { ... }
      }
      AppText {
        Layout.fillWidth: true
        text: "Let there be characters!"
      }
    }
    #12485

    Günther
    Felgo Team

    Thanks for letting us know and sharing the workaround!
    For the IconButton this should be solvable quite fast. More complex controls will need some more attention, as some automatic resizing is applied internally. We will have a closer look on that!

    Best,
    Günther

    #12498

    Günther
    Felgo Team

    Hi Nathan!
    I just tested a RowLayout with IconButtons and AppText like in your example, but for me everything works as expected. Can you provide more information what is happening and how you would expect it to work?

    Best, Günther

    PS: The IconButton does not change the icon size if the width/height is modified, because of an additional padding area around the button to provide a tappable-area that is comfortable to use. To make the icon bigger the size property may be used.

    #12502

    Nathan

    I can’t reproduce it reliably… Some builds it shows up, some it doesn’t.I don’t know what’s going on there. I guess ignore it for now.

    #12518

    Alex
    Felgo Team

    Hi Nathan,

    Thanks for the feedback. Does it only happen in your own project(s) or also for the very simple example you posted initially? Any QML output that hints to an error?

    Thanks,

    Alex

    #12523

    Nathan

    Use AppButton instead of IconButton and see if that does it. I find that to be more reproducible. I’ve seen it with IconButton, but it’s definitely not as easy to reproduce.

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

RSS feed for this thread

You must be logged in to reply to this topic.