[Interest] QT Android: qApp->applicationName() returning lib name even after settings QCoreApplicaton::setApplication name

Nuno Santos nunosantos at imaginando.pt
Thu Sep 29 22:04:22 CEST 2016


Thiago,

Thanks for your reply.

Is there any specific place to call this? I’m calling at my main controller constructor

This is my main.cpp

int main(int argc, char **argv)
{
    QGuiApplication app(argc, argv);

    Controller controller(&app);

    QQmlApplicationEngine engine;
    engine.rootContext()->setContextProperty("controller", &controller);
    engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));

    return app.exec();
}

This is controller constructor:

Controller::Controller(QObject *parent) :
    QObject(parent)
{
    QCoreApplication::setOrganizationName("Imaginando");
    QCoreApplication::setApplicationName("TKFX");
}

Since my app is contracted with QGuiApplication, should I call QGuiApplication::setApplicationName instead? Might that be the problem?

Thanks,

Regards,

Nuno

> On 29 Sep 2016, at 19:48, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On quinta-feira, 29 de setembro de 2016 18:57:01 PDT Nuno Santos wrote:
>> Hi,
>> 
>> I’m facing myself with a simple problem.
>> 
>> I’m settings QCoreApplication::setApplication(NAME) but when I ask for
>> qApp->applicationName, the result is a libTARGET.so
>> 
>> Isn’t it supposed to set the name to NAME?
> 
> It is and it does that. Your problem is elsewhere.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list