Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A way to know the current element edited on QGridLayout?

A way to know the current element edited on QGridLayout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 563 Views 1 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.
  • yczoY Offline
    yczoY Offline
    yczo
    wrote on last edited by yczo
    #1

    Hello, a simply question. When we have a QLienEdir matrix, like the image below shows,

    http://postimg.org/image/jwgv4esmp/

    Exist a way to know the position in grid, of the current element edited? Or we have to connect 100 signals and 100 slots in a 100x100 matrix

    my idea is connect all to one slot and decide there, which signal corresponds in a particular string matrix

    like always, any ideas or suggestions are welcome

    thanks in advance.
    Greetings

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      You can use
      http://doc.qt.io/qt-5/qsignalmapper.html#details

      Also, you can connect many signals to same slot.
      in the slot u can use the sender() function
      to know which widget was the signal sender.

      While you can ask Which widget has focus, the correct way is
      to use signals.

      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