Qt Ministro Android downloads ~35,97 Mb for simple "QT += qml quick widgets network sql multimedia"



  • Hello everybody,
    i am trying qtquick and it is awesome in Ui well designed but when deploying on android there something wrong.....
    I have learnt that qt Ministro has a lot of advantages.. One of it's advantages is to decrease the size of the Application... But I am trying a simple application that need this modules "QT += qml quick widgets network sql multimedia" and when Qt Ministro finish to download all qt Lib.. i see that it has downloaded ~35,97 Mb.. instead of ~8 Mb as i saw in previous post of qt Members..
    So my application needs this modules ... so i want to know what is the problem..?

    Thank you for your help!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You are using 8 (gui and core that are in by defaults) modules currently and some heavy ones like widgets. So the size doesn't surprise me. Are you sure you need them all ?



  • Thank you SGaist,
    Now i have removed widgets module ..
    and my file.pro looks like that:

    @QT += qml quick network sql multimedia
    QT -= gui core@

    But still the problem persists... the same size...~35Mb


  • Lifetime Qt Champion

    You can't remove gui and core, they are mandatory for a GUI application



  • thank you but ...

    My application is oriented QtQuick.. ot means there is some Classes in C++ (not user interface) and i use them in qml by register them using qmlRegisterType
    So i don't see any other module i can remove here:
    Check These files:

    file.pro looks like that
    @TEMPLATE = app

    QT += quick network sql multimedia

    SOURCES += main.cpp
    httpdownloader.cpp
    rpa.cpp
    database.cpp
    liodate.cpp
    medianews.cpp

    RESOURCES += qml.qrc
    qml.qrc

    Additional import path used to resolve QML modules in Qt Creator's code model

    QML_IMPORT_PATH =

    Default rules for deployment.

    include(deployment.pri)

    HEADERS +=
    httpdownloader.h
    rpa.h
    database.h
    liodate.h
    medianews.h

    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

    OTHER_FILES +=

    DISTFILES +=
    Notes.txt
    @
    and my main.cpp
    @
    #include <QGuiApplication>
    #include <QtQml>
    #include <QQmlApplicationEngine>
    #include<database.h>
    #include <medianews.h>
    #include <liodate.h>
    #include <rpa.h>
    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);
    //registering Classes to Qml
    // qmlRegisterType<HttpDownloader> ("HttpDownloader", 1,0, "Downloader");
    qmlRegisterType<Database> ("Database", 1,0, "Database");
    qmlRegisterType<News> ("News", 1,0, "News");
    qmlRegisterType<Rpa> ("Rpa", 1,0, "Rpa");
    qmlRegisterType<LioDate> ("LioDate", 1,0, "LioDate");

    // QML ENGINE
    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    
    return app.exec();
    

    }
    @
    Before in the main .cpp it was QApplication instead of QGuiApplication but i changed QApplication to QGuiApplication in other to remove widgets module in the file.pro

    Also in the main.cpp , i can't remove #include <QtQml> because it is used for qmlRegisterType.

    Please. Thank you


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.