Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. need help understanding "connect"
Qt 6.11 is out! See what's new in the release blog

need help understanding "connect"

Scheduled Pinned Locked Moved Unsolved C++ Gurus
3 Posts 2 Posters 1.3k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by Anonymous_Banned275
    #1
    This post is deleted!
    Axel SpoerlA 1 Reply Last reply
    0
    • A Anonymous_Banned275

      This post is deleted!

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @AnneRanch
      Can you explain in simple English, what is the purpose of your nested loops and arrays?

      Software Engineer
      The Qt Company, Oslo

      Axel SpoerlA 1 Reply Last reply
      0
      • Axel SpoerlA Axel Spoerl

        @AnneRanch
        Can you explain in simple English, what is the purpose of your nested loops and arrays?

        Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by Axel Spoerl
        #3

        @AnneRanch
        To make your code work, you need to do the right things right. I don’t know exactly what you want to achieve. How your menus should look like. Draw them on a sheet of paper and post a photo.
        Your issues are not related to understanding “connect”. Your connect statements are syntactically correct, meaning you are doing it right. But you want to connect signals from objects in a nested container all to the same slot. So the slot has to know, who fired the signal. That’s where the drama starts. Why hide information at one place by architecture, so you have to dig it out on the other end, in the slot. Why not write a slot or a lambda for each action you want to connect to? Your issue is in the loops around nested containers, not in “connect”. I haven’t seen a use case that requires such a complicated structure. Maybe it’s necessary in your case. Let us know. Tell us why. You are not handling the structure well, otherwise you wouldn’t connect to a nullptr. If you want to fix your code, this is where to look.

        Software Engineer
        The Qt Company, Oslo

        1 Reply Last reply
        1

        • Login

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