Project

General

Profile

Actions

Feature #1049

open

preventDefaultAction should be owned by SignalBase?

Added by Zhimin Song over 12 years ago. Updated over 12 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/05/2011
Due date:
% Done:

0%

Estimated time:

Description

Hey wt group:

When I use mouseKeyWentUp().preventDefaultAction(), the compiler gave me a error, I found preventDefaultAction() is EventSignalBase's member, but my mouseKeyWentUp()'s sender is a WTableView, WTableView's mouseKeyWentUp() returns a Signal< WModelIndex, WMouseEvent >, which is derived from SignalBase and has no preventDefaultAction member:-(

Thanks

Zhimin

Actions #1

Updated by Koen Deforche over 12 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

Hey Zhimin,

Adding it to SignalBase is not the solution to this problem though (a default action is only defined for browser-initiated eventsignals).

What default action are you actually trying to prevent? There might be other ways to do that ?

Regards,

koen

Actions #2

Updated by Zhimin Song over 12 years ago

Hey Koen:

What default action are you actually trying to prevent? There might be other ways to do that ?

Thanks for your reply, and In the WTableView, I want to use mouseKeyWentUp(), then judge the WMouseEvent value whether equals to RightButton, if true it will pop up a menu for some operations, if false it just selects the row item.

Thanks again.

Regards

Zhimin

Actions #3

Updated by Koen Deforche over 12 years ago

Hey Zhimin,

I believe only the left button should be handled for selection. If we make this change in the library, then you can react to mouseWentUp() and implement the popup menu if it was the right button ?

Regards,

koen

Actions

Also available in: Atom PDF