Clear the Qwidget window using window id



  • Hi,

    Is there any way to clear/refresh the window (QWidget) by making use of window id.
    this is the code i am using.

    Please help.

    Process1:
    @
    QX11EmbedContainer *Cont = new QX11EmbedContainer;
    qDebug()<<"Cont Addr"<<Cont;
    QProcess *Proc1 = new QProcess(Cont);
    QStringList Arguments;
    Arguments<QString::number(Cont-windId());
    Proc1->start(someappproc, Arguments);
    @

    Process2:

    @
    QApplication qApp(argc, argv);
    QString s_WinId(qApp.arguments()[1]);
    WId l_WinId = sWinId.toLong();
    QWidget *temp = QWidget ::find(l_Winid);
    qDebug()<<"temp Addr"<<temp;
    @

    The problem i am facing is , some times the contents(images/video) displayed on the window are not cleared even though the application is terminated.
    I thought of accessing the address and try to use QPalette or something to change the color to black so that the window is cleared, but i am not able to access it from another process , and we cannot do that, i referred from here
    http://stackoverflow.com/questions/17319853/can-qwidgetfind-find-widgets-from-a-different-process
    i would like to clear the contents displayed on the window using the s_WinId or l_WinId.

    i found that in the application side they are using "gst_x_overlay_set_window_handle" to embed a window inside another, is there any function available to clear the window using window Id.



  • Any suggestion on this please....


Log in to reply
 

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