Hi I'm trying to implement the idea of signals and slots outside of Qt and I was wondering about how Qt actually knows which button and hence which object you click on in a user interface? Does it use some sort of inbuilt container whenever you create clickable buttons in the Ui and then it iterates through that container to determine which button has been pressed?
Since this is an openGl implementation that I'm creating the interface in, the easiest way that I can think of is to have members inside the button class that store the dimensions and positions of the buttons and chuck all the buttons into a qlist/container and then whenever a mouse click even occurs, iterate through the list to determine if the click occurred over the buttons. However this seems like a really slow way of going about things and performance is important for my purpose and I was wondering how else I might go about solving this problem?
Bookmarks