Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Clear the Qwidget window using window id
Forum Updated to NodeBB v4.3 + New Features

Clear the Qwidget window using window id

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dcqt
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Dcqt
      wrote on last edited by
      #2

      Any suggestion on this please....

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved