Wednesday, 15 May 2013

c++ - Qt Mouse Event Receiving issue -


This may sound as a simple question, but I could not find a long answer, so I decided to have a Ask a question I have a class with QFrame in it there are two buttons Problems: When I set those buttons to parents like "this" but they do not have any mouse response I set my parents as my QFrame :

When:

  m_btnCompile = new ApproxGUenuButton (this); M_btnSettings = New ApproxGUImenu button (this);  

does not work

when:

  m_btnCompile = new ApproxGUenuButton (parentWidget ()); M_btnSettings = New ApproxGUenuButton (parentWidget ());  

Works

The second option is not a solution for me because I need a button to be in the local coordination system. Generator is generated by QDesigner. I am working in Visual Studio 2013. If it is important what should I do? help please.

The problem is solved but I do not know any reason yet. I have added a new member from QWidget and within these buttons have set the parents as parents and it has worked


No comments:

Post a Comment