A way to know the current element edited on QGridLayout?

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


    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.

  • Qt Champions 2017

    You can use

    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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.