Rhythm_2020
2nd June 2014, 06:44
Dear All,
I am newbie in qt gui development, i have created the QTreeWidget Class and added the QTreeWidgetItems liks,
class xyz: public QTreeWidget
{
QOBJECT
public:
xyx (QWidget *inParent = 0 );
private:
QTreeWidgetItem *aItem;
};
in c file i have created the QTreeWidgetItem like this
QTreeViewItem *a1 = new QTreeWidgetItem(this);
a1->setBackground = (0,QBrush(QImage(":/Images/001.png")));
QTreeViewItem *a2 = new QTreeWidgetItem(this);
a2->setBackground = (0,QBrush(QImage(":/Images/003.png")));
the images are displayed successfully, in the run time when the a2item selected the 003.png image will display in the a1 and when the a2 item selected the 004.png image will display i am using style sheet.
please give suggestions for me to display the different images in the item when the item selected.
sorry for the bad english.
Thanks in advance.
I am newbie in qt gui development, i have created the QTreeWidget Class and added the QTreeWidgetItems liks,
class xyz: public QTreeWidget
{
QOBJECT
public:
xyx (QWidget *inParent = 0 );
private:
QTreeWidgetItem *aItem;
};
in c file i have created the QTreeWidgetItem like this
QTreeViewItem *a1 = new QTreeWidgetItem(this);
a1->setBackground = (0,QBrush(QImage(":/Images/001.png")));
QTreeViewItem *a2 = new QTreeWidgetItem(this);
a2->setBackground = (0,QBrush(QImage(":/Images/003.png")));
the images are displayed successfully, in the run time when the a2item selected the 003.png image will display in the a1 and when the a2 item selected the 004.png image will display i am using style sheet.
please give suggestions for me to display the different images in the item when the item selected.
sorry for the bad english.
Thanks in advance.