I have following code and I have to change it with Qt4 code.
QIcon icon;
QPixmap pixmap = icon.pixmap(); // Qt3 code
for replacing Qt3 code with Qt4, I have to replace pixmap()
with one of following methods provided by the Qt4.
QPixmap QIcon::pixmap ( const QSize & size, Mode mode = Normal, State state = Off ) const
QPixmap QIcon::pixmap ( int w, int h, Mode mode = Normal, State state = Off ) const
QPixmap QIcon::pixmap ( int extent, Mode mode = Normal, State state = Off ) const
Since I don't know what size or dimension it is using in this call of pixmap(void)
. So I need to find out alternative which can eliminate this code without asking explicitly size.
What I understand from this code segment. It is taking size of icon. So I try to find out size of icon. But again I do not find any method to get size of icon.