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. OS Like State Changes, QML

OS Like State Changes, QML

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

    Hello, newbie here and first post.

    To keep things clean, I have 5 QML files: one for main QML doc, one for menu bar, and three for the separate menu item pages. When I click on the first button in the menu QML, I'd like to load the specific QML file associated with it. What the user would see would be like clicking on an item in your Mac dock and having it appear on the screen.

    I'm having troubles understanding how the signals and slots get passed around. I can change state on the button menu easily enough using QT Quick, i.e. animate the menu buttons, etc. However, how do I get the main QML document to recognize the onClick from the child QML menubar and make the menu specific QML file visible on the page? I tried the larger states setup, but I must not understand it enough to implement.

    Can anyone help out there? I appreciate it.

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by dheerendra
      #2

      You can define the signals in each qml component. From these components you must create objects. So objects emit signals. You need to connect these object signals with slots inside your main component.

      I feel you can look at simple example signals/slots communication in QML. This should help you. If you need simple sample, I will provide you. I'm sure one of the post should have simple sample as well posted by me earlier.

      You can refer the documentation here

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

      1 Reply Last reply
      2

      • Login

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