Fix hanging context menu for TQtWidget canvas. Fixes ROOT-4031.