The menu popup is created in the following way. Keep in mind I am new to QT and C++. I am sure it is not very pretty. I have literally tried a 100 different combinations of flags. This is just the latest (and the one in the test case). There is a good chance it is my code. I am probably doing something really dumb and obvious to anyone else.
LHMenu::LHMenu()
: LHWebView(), caller(0)
{
setWindowModality(Qt::ApplicationModal);
qpalette.
setBrush(QPalette::Base, Qt
::transparent);
page()->setPalette(qpalette);
setAttribute(Qt::WA_OpaquePaintEvent, false);
setAttribute(Qt::WA_TranslucentBackground, true);
setWindowFlags(Qt::FramelessWindowHint | Qt::SplashScreen);
page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
setContextMenuPolicy(Qt::NoContextMenu);
connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
load
(QUrl("qrc:/menu.html"));
}
LHMenu::LHMenu()
: LHWebView(), caller(0)
{
setWindowModality(Qt::ApplicationModal);
QPalette qpalette = palette();
qpalette.setBrush(QPalette::Base, Qt::transparent);
page()->setPalette(qpalette);
setAttribute(Qt::WA_OpaquePaintEvent, false);
setAttribute(Qt::WA_TranslucentBackground, true);
setWindowFlags(Qt::FramelessWindowHint | Qt::SplashScreen);
page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
setContextMenuPolicy(Qt::NoContextMenu);
connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
load(QUrl("qrc:/menu.html"));
}
To copy to clipboard, switch view to plain text mode
Bookmarks