OverviewFelgo Plugins Support › nested item gameWindowAnchorItem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #13892




    i have a item in an item in a scene and want to fill the inner rect fullscreen  using gameWindowAnchorItem

    hoe can i do that? or is there another way?


    Felgo Team

    Hi Bas!

    As you probably know, it is not possible to use anchoring in this case, as anchoring is only possible to sibling items or the parent in the QML tree.

    The solution is to position and size the item manually by setting the x/y and width/height properties accordingly:

    import Felgo 3.0
    import QtQuick 2.0
    GameWindow {
      id: gameWindow
      activeScene: scene
      screenWidth: 960
      screenHeight: 640
      Scene {
        id: scene
        width: 480
        height: 320
        // fills scene
        Item {
          anchors.fill: parent
          // fills gamewindow
          Rectangle {
            x: scene.gameWindowAnchorItem.x
            y: scene.gameWindowAnchorItem.y
            width: scene.gameWindowAnchorItem.width
            height: scene.gameWindowAnchorItem.height
            color: "green"






    ah ok,


Viewing 3 posts - 1 through 3 (of 3 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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support