nbkhwjm
7th October 2008, 22:57
In the setup function of my application I have:
//Connection Status Icon
QLabel *test = new QLabel;
test->setPixmap(QPixmap(":/images/not_connected_32x32.png"));
test->setScaledContents(false);
//test->setFrameShadow(QFrame::Plain);
//test->setFrameShape(QFrame::NoFrame);
test->setAlignment(Qt::AlignRight);
ui.statusBar->insertPermanentWidget(0, test,0 );
This puts the correct Icon in the Status bar fine
My problem is updating it later, by function...
Here is what I have, but it is not working
void TestApp::updateStatusBarIcon(QString &statusIcon)
{
qDebug() << "Icon change" << statusIcon;
test1->setPixmap(QPixmap(statusIcon));
}
Any ideas how i can update the PIXMAP Icon on the statusBar?
TIA.
//Connection Status Icon
QLabel *test = new QLabel;
test->setPixmap(QPixmap(":/images/not_connected_32x32.png"));
test->setScaledContents(false);
//test->setFrameShadow(QFrame::Plain);
//test->setFrameShape(QFrame::NoFrame);
test->setAlignment(Qt::AlignRight);
ui.statusBar->insertPermanentWidget(0, test,0 );
This puts the correct Icon in the Status bar fine
My problem is updating it later, by function...
Here is what I have, but it is not working
void TestApp::updateStatusBarIcon(QString &statusIcon)
{
qDebug() << "Icon change" << statusIcon;
test1->setPixmap(QPixmap(statusIcon));
}
Any ideas how i can update the PIXMAP Icon on the statusBar?
TIA.