Ok Chris here is the code snippet.....
#ifdef QT_DEBUG_APPLICATION_SCREEN
qDebug() << "QTmApplicationScreen:" << "Create Application Screen";
#endif
//setLayout(new QHBoxLayout);//Added
m_deviceList
= new QHash<int,
QWidget *>
();
m_iconList = new QList<QAppIcon *>();
}
void QAppScreen
::addApplication(QTmApplication
*application,
QWidget *mwidget
) { #ifdef QT_DEBUG_APPLICATION_SCREEN
qDebug() << "QTmApplicationScreen:" << "Add Application" << application->name() << "to App List" << application->upnpControlPointId();
#endif
if (!m_deviceList->contains(application->upnpControlPointId())) {
layout()->addWidget(widget);
//layout()->addWidget(mwidget);
m_deviceList->insert(application->upnpControlPointId(), widget);
}
QAppIcon *icon = new QAppIcon(application, this);
m_deviceList->value(application->upnpControlPointId())->layout()->addWidget(icon);
m_deviceList->value(application->upnpControlPointId())->layout()->addWidget(mwidget);
connect(icon, SIGNAL(clicked(QTmApplication*)), this, SIGNAL(launchApplication(QTmApplication*)));
m_iconList->append(icon);
update();
}
QAppScreen::QAppScreen(QWidget *parent) : QWidget(parent) {
#ifdef QT_DEBUG_APPLICATION_SCREEN
qDebug() << "QTmApplicationScreen:" << "Create Application Screen";
#endif
setLayout(new QVBoxLayout);
//setLayout(new QHBoxLayout);//Added
m_deviceList = new QHash<int, QWidget *>();
m_iconList = new QList<QAppIcon *>();
}
void QAppScreen::addApplication(QTmApplication *application,QWidget *mwidget) {
#ifdef QT_DEBUG_APPLICATION_SCREEN
qDebug() << "QTmApplicationScreen:" << "Add Application" << application->name() << "to App List" << application->upnpControlPointId();
#endif
if (!m_deviceList->contains(application->upnpControlPointId())) {
QWidget *widget = new QWidget(this);
widget->setLayout(new QHBoxLayout);
layout()->addWidget(widget);
//layout()->addWidget(mwidget);
m_deviceList->insert(application->upnpControlPointId(), widget);
}
QAppIcon *icon = new QAppIcon(application, this);
m_deviceList->value(application->upnpControlPointId())->layout()->addWidget(icon);
m_deviceList->value(application->upnpControlPointId())->layout()->addWidget(mwidget);
connect(icon, SIGNAL(clicked(QTmApplication*)), this, SIGNAL(launchApplication(QTmApplication*)));
m_iconList->append(icon);
update();
}
To copy to clipboard, switch view to plain text mode
The requirement is i want to disable the icons but not the mwidget.....icons are used to launch certain apps.....and the icons are populating from a server and the above code is runnig in the client....is der any option?
Bookmarks