Results 1 to 3 of 3

Thread: qt3to4 - The Journey

  1. #1
    Join Date
    Dec 2010
    Location
    UK
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qt3to4 - The Journey

    Hi all
    I have problem with occurring error as ;
    cannot convert 'QDesktopWidget*' to 'QWidget*' in initialization
    colorpop.h
    Qt Code:
    1. QWidget *d = QApplication::desktop (); // this line generate error
    2. QPixmap pm = QPixmap::grabWindow (d->winId (), p.x (), p.y (), 1, 1);
    To copy to clipboard, switch view to plain text mode 
    according to qt3 examples it should looks like
    Qt Code:
    1. QWidget *d = QApplication::desktop();
    To copy to clipboard, switch view to plain text mode 
    but in q 4.7 is generating err msg.

    Any help is welcoming

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qt3to4 - The Journey

    Did you #include <QDesktopWidget>?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2010
    Location
    UK
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qt3to4 - The Journey

    thx it works

Similar Threads

  1. Replies: 1
    Last Post: 9th December 2010, 18:37
  2. Replies: 1
    Last Post: 19th August 2010, 13:10
  3. qt3to4
    By rishiraj in forum Newbie
    Replies: 1
    Last Post: 19th December 2008, 10:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.