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. How can i get item from another Page?
Qt 6.11 is out! See what's new in the release blog

How can i get item from another Page?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 911 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.
  • JobRecrdJ Offline
    JobRecrdJ Offline
    JobRecrd
    wrote on last edited by JobRecrd
    #1

    I need to get an object from another page, the code is in one file . How can I do it?

     ScrollView
        {
            Page
            {
                id: firstPage
                height: 500
                width: 600
                ColumnLayout
                {
                    Rectangle
                    {
                      id: recPull
                    }
        
                    ///
                }
            }
        }
        
        ScrollView
        {
            Page
            {
                id: secondPage
                height: 500
                width: 600
                ColumnLayout
                {
                    
                    ///here i Rectangle with id recPull
                }
            }
        }
    
    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
      wrote on last edited by
      #2

      If you are in same file, you can access the id directly. Any problem are you facing ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      https://www.pthinks.com

      JobRecrdJ 1 Reply Last reply
      0
      • dheerendraD dheerendra

        If you are in same file, you can access the id directly. Any problem are you facing ?

        JobRecrdJ Offline
        JobRecrdJ Offline
        JobRecrd
        wrote on last edited by
        #3

        @dheerendra
        I want a rectangle to appear on both pages.

        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