Could I use QWidget and qml together?
I want to use QTextBrowser to create a simple help engine
How could I open a QWidget from qml?
something like
Code:
import QtQuick 2.1
import Help 1.0
Rectangle {
width: 100
height: 62
HelpBrowser{id: helpBrowser}
MouseArea{
anchors.fill: parent
onClicked: {
helpBrowser.showBrowser()
}
}
}
Or there exist easier solution in qml?
Re: Could I use QWidget and qml together?
Expose a "HelpBrowser" type to QML that will open a widget when its showBrowser() slot is called. Be aware the widget will be opened in a new window. Also remember to construct a QApplication instead of QGuiApplication and link the widgets module.
Re: Could I use QWidget and qml together?
Thanks, qml do not exist a rich text "browser" like QTextBrowser?
QWebkit is not an option since Qt on android do not support this module yet
But open a new window on mobile is weird too
Re: Could I use QWidget and qml together?
Quote:
Originally Posted by
stereoMatching
Thanks, qml do not exist a rich text "browser" like QTextBrowser?
You can show rich text using the Text element.
Re: Could I use QWidget and qml together?
I wrote some helps as "html", Text element can't bite all of the tags in those html, but I guess
I don't have a better choice but to do some alternation about the helps by now.
Re: Could I use QWidget and qml together?
The codes works now, I typed something wrong before. Thanks for your helps