Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Control the widget using WId



  • Hi,
    can anybody let me know what are all the functionalities that can be controlled using just the WId.
    I have a problem and i have access to only WId of the widget.
    i try to find out address of the widgetto control but i cannot do so, because i am accessing the widget in another process.

    @
    WId QWidget::winId () const
    @



  • Hi!

    winId() is a handle to a window (HWND data type). You can use it with window management functions (Windows only). "Here":http://msdn.microsoft.com/en-us/library/windows/desktop/ff468919.aspx is a list of them.

    Many of this functions are already used by Qt, so there is usually no need of using them.



  • Thanks for the reply.

    but i am working on linux and the problem is the video images are not cleaned from the widget , is there any way to refresh or clear the widget before some thing else is launched.

    i tried

    @
    setPalette(QColor(85,84,8,255));
    setAutoFillBackground(true);
    @

    the color is changed but still the previous image contents is still seen.
    please help..



  • I don't have much experience with Linux native windows, but I'm pretty sure that you don't need this function.

    There is a "QWidget::repaint":http://qt-project.org/doc/qt-4.8/qwidget.html#repaint-6 that should do the trick. There is also an options of overloading paint if necessary.
    Are you doing this on graphics scene or purely on widget?


Log in to reply