Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Warning: StackView: cannot transition an item that is anchored! Why?
Forum Updated to NodeBB v4.3 + New Features

Warning: StackView: cannot transition an item that is anchored! Why?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 620 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello!
    I've got this warning in logs:

    StackView: cannot transition an item that is anchored!
    

    I've never been having this kind of troubles before. Is there any manuals to read about it? I mean about this waring. For me isn't clear right now about which items shouldn't be anchored.

    import QtQuick 2.15
    import QtQuick.Controls 1.4
    
    SScreenContentTemplate {
    
    	id: oRoot;
    	color: oApplicationWindow.pColorBackground;
    
    	StackView {
    
    		id: oStackView;
    		width: parent.width;
    		height: parent.height;
    		anchors.top: parent.top;
    		anchors.bottom: parent.bottom;
    		anchors.left: parent.left;
    		anchors.right: parent.right;
    
    		Component.onCompleted: {
    
    			oStackView.push(oScreenLogin);
    		}
    
    		Component {id: oScreenLogin; SScreenLogin {}}
    		Component {id: oScreenSearch; SScreenSearch {}}
    		Component {id: oScreenRegister; SScreenRegister {}}
    		Component {id: oScreenMainMenu; SScreenMainMenu {}}
    		Component {id: oScreenTest; SScreenTest {}}
    
    		delegate: StackViewDelegate {
    
    			function transitionFinished(inProperties) {
    
    				inProperties.exitItem.opacity = 1;
    			}
    
    			pushTransition: StackViewTransition {
    
    				PropertyAnimation {
    
    					target: enterItem;
    					property: "opacity";
    					from: 0;
    					to: 1;
    				}
    
    				PropertyAnimation {
    
    					target: exitItem;
    					property: "opacity";
    					from: 1;
    					to: 0;
    				}
    			}
    		}
    	}
    
    	function onSgOrientationChanged(inOrientation) {}
    }
    

    Which anchors should be dleted?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bogong
      wrote on last edited by bogong
      #2

      Solution found. Issue closed.
      In one of Components - SScreenSearch was this line:

      anchors.fill: parent;
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved