pull/20482/head
iejMac 2021-03-25 17:09:23 -07:00 committed by GitHub
parent bcb6879199
commit d78546afbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,7 @@ TermsPage::TermsPage(QWidget *parent) : QFrame(parent){
main_layout->setMargin(40);
main_layout->setSpacing(40);
QQuickWidget *text = new QQuickWidget(QUrl::fromLocalFile("qt/offroad/text_view.qml"), this);
QQuickWidget *text = new QQuickWidget(this);
text->setResizeMode(QQuickWidget::SizeRootObjectToView);
text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
text->setAttribute(Qt::WA_AlwaysStackOnTop);
@ -71,6 +71,8 @@ TermsPage::TermsPage(QWidget *parent) : QFrame(parent){
QString text_view = util::read_file("../assets/offroad/tc.html").c_str();
text->rootContext()->setContextProperty("text_view", text_view);
text->setSource(QUrl::fromLocalFile("qt/offroad/text_view.qml"));
main_layout->addWidget(text);
// TODO: add decline page