Forums

OverviewV-Play 2 Support (Qt 5) › Many V-Play 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
    V-Play 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
    V-Play 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support