Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickWidget and TextInput or TextField not working in Qt 5.3.0 RC
Forum Updated to NodeBB v4.3 + New Features

QQuickWidget and TextInput or TextField not working in Qt 5.3.0 RC

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 946 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.
  • A Offline
    A Offline
    asti
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      asti
      wrote on last edited by
      #2

      Nobody some hint? Can someone ackknowledge that TextInput in QQuickWidget QT5.3.0 RC is working?

      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