hi, i’m trying to add a button defined in qml to an existing project, but when i click the button it does not respond (does not press down / provide any feedback that it has been clicked, and i don’t think the event is fired either). i’m using Qt5.1 under OSX.
my qml is as follows:
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
Rectangle {
width: 200
height: 200
Button {
text: qsTr("Hello World")
anchors.centerIn: parent
}
}
and i embed this as follows (as per this blog post here [blog.qt.digia.com] ):
QQuickView *qqView = new QQuickView();
QWidget *container = QWidget::createWindowContainer(qqView, this);
container->setMinimumSize(200, 200);
container->setMaximumSize(400, 400);
container->setFocusPolicy(Qt::TabFocus);
any tips on how to get this working?
with thanks
↧