Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

SetPixmap doesn't work in linux but works in windows



  • Hello Qt World!
    The following code doesn't work in Kubuntu 12.4, but works fine in Windows.
    @QPixmap pixmap("filename.png"));
    ui->label->setPixmap(pixmap);@

    It's executed in the main thread.
    Seems like this problems is more related to an OS configuration than the code.
    Hints?


  • Moderators

    IIRC windows filesystem is case insensitive while Linux is case sensitive. Check the capitalization of the file.

    Make sure the working directory is indeed the one you assume it is when using relative pathes.


Log in to reply