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

[Solved] QPixmap: It is not safe to use pixmaps outside the GUI thread!



  • I'm not using QPixmap on my code!
    What I can do?

    This error is "ignored" by Gnome but on KDE the applications stops!

    See error on KDE:
    @
    QPixmap: It is not safe to use pixmaps outside the GUI thread
    InoveBEVSAT: xcb_io.c:221: poll_for_event: Assertion `(((long) (event_sequence) - (long) (dpy->request)) <= 0)' failed.
    Aborted
    @

    The unique code that use something "different" is this code:
    @
    DialogSplashScreen::DialogSplashScreen(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DialogSplashScreen)
    {
    ui->setupUi(this);
    QGraphicsScene scene;
    QLabel *gif_anim = ui->icon;
    QMovie *movie = new QMovie(":/imagens/64/loading_1.gif");
    gif_anim->setMovie(movie);
    movie->start();
    scene.addWidget(gif_anim);
    setMaximumWidth( width() );
    setMaximumHeight( height() );
    setWindowFlags( ((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint) );
    }
    @

    I not sure if there is the problem... But I need to fix it and I dont have idea for where look for this problem!



  • I fix it.. but I not understand how a Simple Dialog with some message text can make this errors appears.
    Well, I remove the menssage errors and just add to log... it's better for user.

    Thanks all.


Log in to reply