Of course after I finally posted my question that's been troubling me for days, I think I've found the cause of the problem and, at least, a workaround. Maybe someone can suggest a better solution, but in the meantime, this might be relevant and useful to others.
My button is at the very top left corner of my widget. After looking closer at the widget returned in mousePressEvent childAt(evt->pos()), I see that the widget being returned is actually an instance of a class that I am using that inherits QWidget in order to make use of winEvent but is not actually explicitly added to my GUI/widget/layout/etc. The class was written by a collegue and I did not even realize it was inheriting QWidget until now. The object is used and apparently its "widget" is automatically placed at the top left position on top of everything else and is invisible. Therefore its taking precedence over my button. I moved my button over to the right and I can click it anywhere I want. So, I need to either move this other widget "under" my button or I guess to an empty location on my GUI or have it ignore mouse events but allow widgets under it to receive mouse events. Any suggestions appreciated.
high_flyer -
A button with a menu is a very useful tool!
I'd show code but I made the widget in Qt Designer and my class that uses the ui has 5000 lines of code and clearly wasn't doing anything to the button other then using "QPushButton::setMenu" so I don't know what piece of code would be relevant.
Anyways, I found the cause of my problem (above).
Solution -
I guess once the problem was found a solution was fairly obvious, I just set the size of the interfering widget to (0,0) (using setFixedSize).
Hope this is helpful to someone else!
Bookmarks