Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 18, CityUI needs module installation #227

Open
pedro-vicente opened this issue Aug 6, 2023 · 1 comment
Open

Chapter 18, CityUI needs module installation #227

pedro-vicente opened this issue Aug 6, 2023 · 1 comment

Comments

@pedro-vicente
Copy link

pedro-vicente commented Aug 6, 2023

Chapter 18, CityUI

On page 656, the module is not installed

::: TODO How to install the module? :::

The call to install must be added to main.cpp ?

#include <QApplication>
#include <QQmlApplicationEngine>

#include "fileio.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QQmlApplicationEngine engine;

    FileIO* user = new FileIO(&app);
    qmlRegisterSingletonInstance("org.example.io", 1, 0, "User", user);

    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    return app.exec();
}

@pedro-vicente pedro-vicente changed the title Chapter 18, CityUI needs module installation call on main.cpp Chapter 18, CityUI needs module installation Aug 6, 2023
@pedro-vicente
Copy link
Author

After this, error is

QQmlApplicationEngine failed to load component
qrc:/main.qml:77:9: TableViewColumn is not a type

it seems TableViewColumn in not on Qt6

How can you do a book about Qt6 with APIs not in Qt6?

https://stackoverflow.com/questions/64403258/tableview-replacement-for-tableviewcolumn-in-qt-quick-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant