Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality for assembly preview tooltip #3250

Open
Petross404 opened this issue Oct 13, 2023 · 2 comments
Open

New functionality for assembly preview tooltip #3250

Petross404 opened this issue Oct 13, 2023 · 2 comments

Comments

@Petross404
Copy link
Contributor

Petross404 commented Oct 13, 2023

I hope you are doing well. Once again I find my self envying a feature of Hopper Disassembler and trying to implement it for Cutter

Cutter is using a QToolTip to preview information about the hovered address. This tooltip is "static" meaning that no further interaction can take place with it.

Describe the solution you'd like
Hopper on the other hand uses another approach. Once the user hovers an address, a tooltip will be shown, but if the user scrolls the mouse wheel, this tooltip will change size and the amount of visible information.

Since QToolTip doesn't provide a way to subclass and re-implement events in the class, I implemented a custom tooltip class myself, by inheriting from QLabel, setting window flags, timers etc. Later I will upload this repo in my GH account, so you can view this code.

So far my difference from Hopper's solution, is that Hopper accepts the wheel event on top of the address, while in my case the user has to hover the tooltip itself, for the event handling to take place.

Hopper:
hopper-small-2023-10-13_11 47 43

Let me know what do you think of this approach. I am going to do some polishing and put here a link with the code.

@XVilka
Copy link
Member

XVilka commented Oct 13, 2023

@Petross404 this sounds like a handy solution, indeed. Please send a PR with it.

@Petross404
Copy link
Contributor Author

@Petross404 this sounds like a handy solution, indeed. Please send a PR with it.

Excellent. I am struggling with some corner cases but since this solution is welcome I will do my best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants