Qt5 and QClipboard in Windows 7



  • Hello.
    I have a problem with this code:
    @#include <QtWidgets/QtWidgets>

    int main( int argc, char *argv[] )
    {
    QApplication a( argc, argv );

    QLabel *l = new QLabel();

    l->setPixmap( QPixmap::fromImage( QApplication::clipboard()->image() ) );
    l->show();

    return a.exec();
    }@

    When I use PrintScreen button, QPixmap is fully black. When I copy an image from another program (for example Ms Paint), QPixmap is discolored: http://rghost.net/40534254/image.png

    Is it Qt bug or I do something wrong?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.