[Interest] Modal Dialog with QQuickView in Qt5
Mitchell Verter
mitchell.verter at gmail.com
Sat Sep 7 00:18:26 CEST 2013
In Qt4, I was able to implement a modal Keyboard Dialog by doing
ModalKeyboard::ModalKeyboard(QWidget *parent) :
QDialog(parent)
{
setModal(false);
keyboard = new QDeclarativeView(this);
keyboard->setSource(QUrl::fromLocalFile("qml/main.qml"));
keyboardObject = keyboard->rootObject();
}
...
void ModalKeyboard::exec()
{
keyboard->show();
QObject * keyboardValueLabel =
((QObject*)keyboardObject)->findChild<QObject *>("keyboardText");
QDeclarativeProperty(keyboardValueLabel, "text").write(typed);
QDialog::exec();
}
However, there is no more QDeclarativeView in Qt5. Instead there is a
QQuickView, which has a QWindow as a parent, not a QWidget and therefore
not a QDialog.
Is tere a way to replicate the same bheaviour, to have the application
block until the user accepts the keyboard input?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130906/1723dd0d/attachment.html>
More information about the Interest
mailing list