Hello

I try to port a program from using 'createWindowContainer' to the new QQuickWidget in Qt 5.3.0 RC

In this widget i have a simple Rectangle with a TextInput. The 'TextInput' shows no cursor when clicked and doesn't respond to keystrokes. Also TextField from the desktop controls doesn't work.

What do i miss, or is this a bug?

import  QtQuick  2.1
import  QtQuick.Controls  1.1;
import  QtQuick.Layouts  1.0;
import  QtQuick.Controls.Styles  1.1

Rectangle  {
    width:  400
    height:  400
    color:  "beige"

    TextInput  {
        id:  mytext
        x:  40
        y:40
        width:  100
        height:50
        focus:  true
    }
}

MainWindow::MainWindow(QWidget  *parent)  :
    QMainWindow(parent),
    ui(new  Ui::MainWindow)
{
    ui->setupUi(this);

    QQuickWidget  *w  =  new  QQuickWidget();
    w->setResizeMode(QQuickWidget::SizeRootObjectToView);
    w->setFocusPolicy(Qt::ClickFocus);
    w->setSource(QUrl("qrc:/test.qml"));

    this->setCentralWidget(w);
    w->show();
}

The version with QQuickView and createWindowContainer work as expected.

Thanks for yout hints


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

Reply via email to