
Originally Posted by
wysota
Could we see some code?
Sure. Sorry it's been a while, I've been squashing more important bugs in the mean-time.
First, I took a couple of snapshots showing what's going on. The first shows the full-screen app (pretty simple menu with push-buttons), the second shows what happens when you put a full-screen widget on top of a full-screen widget. Any way around this?
The code is pretty simple. What I'm doing is I have a "menu plugin" that gets loaded which carries a QWidget-based class (some are inheritted from QGLWidget, some from just QWidget). I then call the menu's showFullScreen() function. The code for this section:
evilcpcMenu * m = lPluginMenu[0];
...
// ... lots of stuff where things are being generated and connected
if(!m->addItems(mis))
{ // This section adds items to the menu. Seems to work fine
qDebug("%s:%s(%d) - Failed to add a menu item to menu '%s': %s", __FILE__, __FUNCTION__, __LINE__ - 2, lPluginMenu[0]->getName().toAscii().constData(), m->errorString().toAscii().constData());
}
...
// Connecting all plugins signals to all plugins slots via mneumonics
// and QMetaObject (reflection)
menu->showFullScreen();
evilcpcMenu * m = lPluginMenu[0];
QWidget * menu = m->getWidget();
...
// ... lots of stuff where things are being generated and connected
if(!m->addItems(mis))
{ // This section adds items to the menu. Seems to work fine
qDebug("%s:%s(%d) - Failed to add a menu item to menu '%s': %s", __FILE__, __FUNCTION__, __LINE__ - 2, lPluginMenu[0]->getName().toAscii().constData(), m->errorString().toAscii().constData());
}
...
// Connecting all plugins signals to all plugins slots via mneumonics
// and QMetaObject (reflection)
menu->showFullScreen();
To copy to clipboard, switch view to plain text mode
This works fine. Then when the menu activates a push-button, that plugin gets called and does the following:
void evilcpcMenuItemCdObject::onActivate()
{
if(!w)
{
w = new evilcpcMenuItemCdWidget(qobject_cast<QWidget *>(parent()));
}
w->showFullScreen();
}
void evilcpcMenuItemCdObject::onActivate()
{
if(!w)
{
w = new evilcpcMenuItemCdWidget(qobject_cast<QWidget *>(parent()));
}
w->showFullScreen();
}
To copy to clipboard, switch view to plain text mode
Now this works also, but the background is transparent, the layout only seems to cover the top-left corner, and... well... it's ugly. Any ideas?
Bookmarks