Hello,

I understand that it is no longer possible to use QWidget::create() with the 
same result under Qt5 but it's not clear to me how convert the following kind 
of code (not mine so I may not understand it perfectly):

class Foo : public QWidget;

Foo:Foo(WId id)
        : QWidget()
{
    if (id) {
        create( id, false, true );
    }
}

>From what I understand this allows to subclass QWidget and still create an 
>instance of this new class from an arbitrary WId (an X11 Window in this case).

The Qt5 replacement 

QWidget::fromWindowContainer(QWindow::fromWinId(id))

creates a new QWidget which would then have to be converted to an instance of 
the child class, but how?

Thanks!

R.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to