Qt application on arm-linux flickers when show window



  • qt version:4.8.6
    platform information: x11,arm-linux(tk1)
    demo code:
    Widget::Widget(QWidget parent) : QWidget(parent), ui(new Ui::Widget)
    {
    ui->setupUi(this);
    this->setPalette(QPalette(QColor(Qt::black)));
    QPushButton
    button = new QPushButton("next",this);
    connect(button,SIGNAL(clicked()),this,SLOT(onButtonClick()));

    QDialog* dialog = new QDialog(this);
    dialog->resize(size());
    QWidget* topW = new QWidget(dialog);
    QPushButton* button1 = new QPushButton("back",&dialog);
    connect(button1,SIGNAL(clicked()),dialog,SLOT(accept()));
    QVBoxLayout* lw = new QVBoxLayout;
    lw->addWidget(topW);
    lw->addWidget(button1);
    dialog->setLayout(lw);
    }

    void Widget::onButtonClick()
    {

    dialog->exec(); 
    

    }
    when dialog show,there appear flicker obviously,in my pc/linux,it works well,
    Does anyone know why?
    thanks
    0_1502350933583_todialog.gif


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean you have an X11 server running for your application ?

    How are you launching your application ?



  • thanks for you reply,
    i launch it by connect the embedded machine with ssh

    ssh ubuntu@192.168.0.1
    ./untitled

    now,i have solve this problem by add one line code
    QDialog* dialog = new QDialog(this);
    dialog->setAttribute(Qt::WA_NoSystemBackground);//add this code

    even though i don't know why it effected;
    but now a new problem comes
    in the real application(not demo),when run graphicsview.setViewport(new QGLWidget),flicker come out again and worse.if i replace 'new QGLWidget' by 'new QWidget',everything goes well. i'm consulting for information


  • Lifetime Qt Champion

    That only answer my question partially. Do you have an X server running ? Some desktop environment ?



  • @SGaist yes, it has x11 server running for the application.


Log in to reply
 

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