Commit 59f5a57b authored by François Cartegnie's avatar François Cartegnie 🤞

Qt: show context menu on pictureflow (fix #11876)

ContextMenuEvent should be forwarded to parent
when child has Qt::NoContextMenu policy.
Here, I can't figure out what is not working,
parent never fires signal, event at viewport level.

Redirecting signal as a workaound then :/
(might be pixels offset due to missing coordinates conversion)
parent 22152f57
......@@ -484,6 +484,9 @@ PicFlowView::PicFlowView( QAbstractItemModel *p_model, QWidget *parent ) : QAbst
QHBoxLayout *layout = new QHBoxLayout( this );
layout->setMargin( 0 );
picFlow = new PictureFlow( this, p_model );
picFlow->setContextMenuPolicy( Qt::CustomContextMenu );
connect( picFlow, SIGNAL(customContextMenuRequested( const QPoint & )),
this, SIGNAL(customContextMenuRequested( const QPoint & )) );
layout->addWidget( picFlow );
picFlow->setSlideSize(QSize( 4*LISTVIEW_ART_SIZE, 3*LISTVIEW_ART_SIZE) );
setSelectionMode( QAbstractItemView::SingleSelection );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment