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. Set global component by ID. How?
Forum Updated to NodeBB v4.3 + New Features

Set global component by ID. How?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 195 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 all!
    I need to make QML component available from anywhere by ID. Is there any way?
    For example:

    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;
    }
    

    and from any *.qml file access to it something like this from JS:

    ...
    oStackView.pop();
    ...
    
    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