PDA

View Full Version : qt3to4 - The Journey



mkts
11th December 2010, 17:12
Hi all
I have problem with occurring error as ;
cannot convert 'QDesktopWidget*' to 'QWidget*' in initialization
colorpop.h


QWidget *d = QApplication::desktop (); // this line generate error
QPixmap pm = QPixmap::grabWindow (d->winId (), p.x (), p.y (), 1, 1);

according to qt3 examples it should looks like


QWidget *d = QApplication::desktop();

but in q 4.7 is generating err msg.

Any help is welcoming

wysota
11th December 2010, 17:22
Did you #include <QDesktopWidget>?

mkts
11th December 2010, 17:32
thx it works :)