Skip to content
  • 0 Votes
    3 Posts
    227 Views
    J

    @Pl45m4
    Solution Explorer, right click on the project name -> Qt -> "Upgrade to latest Qt project format version". -- this is no longer an option on the Qt menu!! I have not been able to update Qt_INCLUDEPATH_!

  • 0 Votes
    11 Posts
    2k Views
    sierdzioS

    If doStuff() is not const, then don't declare d pointer as const:

    Q_D(myClass) // NO "const" here! d->doStuff();
  • 0 Votes
    5 Posts
    1k Views
    lopeztelL

    @sierdzio Thanks, this is exactly what I needed! Ended up doing:

    #if defined(Q_OS_ANDROID) const QUrl url(QStringLiteral("qrc:/main_android.qml")); #elif defined (Q_OS_LINUX) const QUrl url(QStringLiteral("qrc:/main_linux.qml")); #endif

    in my main.cpp

  • 0 Votes
    19 Posts
    5k Views
    Y

    @JonB Thank you for correct direction. I will modify my code and use it finished Signal for updating dialog box.

  • 0 Votes
    7 Posts
    1k Views
    K

    @JKSH

    Thanks, yes I am aware of this possibility in creator.

    IIRC I had encouraged you to publish the browser extension for Chrome. Great tool! Basically use it all the time.

    I have stumbled across a couple of macros without a trace of documentation. Personally I consider as a pity.

  • Lupdate and macros

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    1k Views
    Pablo J. RoginaP

    @sailor.steve said in Lupdate and macros:

    I wrapped the text in macros that need to be translated

    In addition to @sierdzio response, please keep in mind that Qt translation tools use the "original" text as the key for looking the proper translation in the available loaded Qt translator object, and if such string is not found, that same string is displayed instead.

    This is a little bit different from some other translation tools that use "constants" (i.e. macro?) as the key and then you provide a file with constant -> translation pairs.

  • 0 Votes
    9 Posts
    2k Views
    shavS

    I tried this logic (../Helpers/nestleanconstants.h):

    #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) #define NESTLEAN_MOBILE 1 #else #define NESTLEAN_DESKTOP 1 #endif

    And header of class:

    #ifndef NESTLEANREQUESTMANAGER_H #define NESTLEANREQUESTMANAGER_H #include <QtCore> #include <QtNetwork> #include "../Helpers/nestleanconstants.h" //Others headers #if defined(NESTLEAN_DESKTOP) #include "WebSocket/nestleanwebsocketmanager.h" #endif class NestleanRequestManager : public QObject { Q_OBJECT Q_CLASSINFO("version", "1.1") Q_PROPERTY(NestleanApplicationRequestsManager* appManager READ getAppManager) //other properties #if defined(NESTLEAN_DESKTOP) Q_PROPERTY(NestleanWebSocketManager* webSocketManager READ getWebSocketManager) #endif private: //some code #if defined(NESTLEAN_DESKTOP) NestleanWebSocketManager* m_webSocketManager; #endif public: //some code #if defined(NESTLEAN_DESKTOP) inline NestleanWebSocketManager* getWebSocketManager() { return m_webSocketManager; } #endif signals: public slots: }; #endif // NESTLEANREQUESTMANAGER_H

    Errors the same. I can't understand why it happens.