IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Discussion :

Problème avec la bibliothèque QSingleApplication

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé

    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    532
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2011
    Messages : 532
    Par défaut Problème avec la bibliothèque QSingleApplication
    Bonjour à toutes et à tous,

    Je suis en train de programmer une application où il ne pourra y avoir qu'une seul instance de lancer à la fois, d'où la volonté d'utiliser QSingleApplication.

    J'ai donc télécharger la bibliothèque et ajouter le chemin de cette bibliothèque dans mon fichier .pro
    Problème: lorsque je compile j'ai des erreurs en provenance de fichiers présent dans la bibliothèque (fichier que je n'ai pas touché)

    la première erreur que j'ai est:
    C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include\qt-solutions-qt-solutions\qtsingleapplication\src\qtsingleapplication.h:43: erreur : QtGui/Application: No such file or directory
    #include <QtGui/Application>
    Mais en bidouillant un peu (en écrivant #include <QtGui> et #include <QApplication) l'erreur disparait mais c'est surtout l'erreur que j'ai ensuite qui me pose problème:

    C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include\qt-solutions-qt-solutions\qtsingleapplication\src\qtsingleapplication.h:71: erreur : 'Type' has not been declared
    QtSingleApplication(int &argc, char **argv, Type type);
    Cette erreur se trouve sur la ligne suivante:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
        QtSingleApplication(int &argc, char **argv, Type type);
    donc coment faire pour résoudre l'erreur. Je vous met en dessous le code complet de QtsingleApplication et je rappelle que je n'ai rien touché dedans

    QtSingleApplication.h
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    /****************************************************************************
    **
    ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    ** All rights reserved.
    **
    ** Contact: Nokia Corporation (qt-info@nokia.com)
    **
    ** This file is part of a Qt Solutions component.
    **
    ** You may use this file under the terms of the BSD license as follows:
    **
    ** "Redistribution and use in source and binary forms, with or without
    ** modification, are permitted provided that the following conditions are
    ** met:
    **   * Redistributions of source code must retain the above copyright
    **     notice, this list of conditions and the following disclaimer.
    **   * Redistributions in binary form must reproduce the above copyright
    **     notice, this list of conditions and the following disclaimer in
    **     the documentation and/or other materials provided with the
    **     distribution.
    **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
    **     the names of its contributors may be used to endorse or promote
    **     products derived from this software without specific prior written
    **     permission.
    **
    ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    **
    ****************************************************************************/
     
    #ifndef QTSINGLEAPPLICATION_H
    #define QTSINGLEAPPLICATION_H
     
    #include <QtGui>
    #include <QApplication>
     
    class QtLocalPeer;
     
    #if defined(Q_WS_WIN)
    #  if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT)
    #    define QT_QTSINGLEAPPLICATION_EXPORT
    #  elif defined(QT_QTSINGLEAPPLICATION_IMPORT)
    #    if defined(QT_QTSINGLEAPPLICATION_EXPORT)
    #      undef QT_QTSINGLEAPPLICATION_EXPORT
    #    endif
    #    define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport)
    #  elif defined(QT_QTSINGLEAPPLICATION_EXPORT)
    #    undef QT_QTSINGLEAPPLICATION_EXPORT
    #    define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport)
    #  endif
    #else
    #  define QT_QTSINGLEAPPLICATION_EXPORT
    #endif
     
    class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication
    {
        Q_OBJECT
     
    public:
        QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
        QtSingleApplication(const QString &id, int &argc, char **argv);
        QtSingleApplication(int &argc, char **argv, Type type);
    #if defined(Q_WS_X11)
        QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
        QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
        QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
    #endif
     
        bool isRunning();
        QString id() const;
     
        void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
        QWidget* activationWindow() const;
     
        // Obsolete:
        void initialize(bool dummy = true)
            { isRunning(); Q_UNUSED(dummy) }
     
    public Q_SLOTS:
        bool sendMessage(const QString &message, int timeout = 5000);
        void activateWindow();
     
     
    Q_SIGNALS:
        void messageReceived(const QString &message);
     
     
    private:
        void sysInit(const QString &appId = QString());
        QtLocalPeer *peer;
        QWidget *actWin;
    };
     
    #endif // QTSINGLEAPPLICATION_H
    QtSingleApplication.cpp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    /****************************************************************************
    **
    ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    ** All rights reserved.
    **
    ** Contact: Nokia Corporation (qt-info@nokia.com)
    **
    ** This file is part of a Qt Solutions component.
    **
    ** You may use this file under the terms of the BSD license as follows:
    **
    ** "Redistribution and use in source and binary forms, with or without
    ** modification, are permitted provided that the following conditions are
    ** met:
    **   * Redistributions of source code must retain the above copyright
    **     notice, this list of conditions and the following disclaimer.
    **   * Redistributions in binary form must reproduce the above copyright
    **     notice, this list of conditions and the following disclaimer in
    **     the documentation and/or other materials provided with the
    **     distribution.
    **   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
    **     the names of its contributors may be used to endorse or promote
    **     products derived from this software without specific prior written
    **     permission.
    **
    ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    **
    ****************************************************************************/
     
     
    #include "qtsingleapplication.h"
    #include "qtlocalpeer.h"
    #include <QtGui>
    #include <QWidget>
     
     
    /*!
        \class QtSingleApplication qtsingleapplication.h
        \brief The QtSingleApplication class provides an API to detect and
        communicate with running instances of an application.
     
        This class allows you to create applications where only one
        instance should be running at a time. I.e., if the user tries to
        launch another instance, the already running instance will be
        activated instead. Another usecase is a client-server system,
        where the first started instance will assume the role of server,
        and the later instances will act as clients of that server.
     
        By default, the full path of the executable file is used to
        determine whether two processes are instances of the same
        application. You can also provide an explicit identifier string
        that will be compared instead.
     
        The application should create the QtSingleApplication object early
        in the startup phase, and call isRunning() to find out if another
        instance of this application is already running. If isRunning()
        returns false, it means that no other instance is running, and
        this instance has assumed the role as the running instance. In
        this case, the application should continue with the initialization
        of the application user interface before entering the event loop
        with exec(), as normal.
     
        The messageReceived() signal will be emitted when the running
        application receives messages from another instance of the same
        application. When a message is received it might be helpful to the
        user to raise the application so that it becomes visible. To
        facilitate this, QtSingleApplication provides the
        setActivationWindow() function and the activateWindow() slot.
     
        If isRunning() returns true, another instance is already
        running. It may be alerted to the fact that another instance has
        started by using the sendMessage() function. Also data such as
        startup parameters (e.g. the name of the file the user wanted this
        new instance to open) can be passed to the running instance with
        this function. Then, the application should terminate (or enter
        client mode).
     
        If isRunning() returns true, but sendMessage() fails, that is an
        indication that the running instance is frozen.
     
        Here's an example that shows how to convert an existing
        application to use QtSingleApplication. It is very simple and does
        not make use of all QtSingleApplication's functionality (see the
        examples for that).
     
        \code
        // Original
        int main(int argc, char **argv)
        {
            QApplication app(argc, argv);
     
            MyMainWidget mmw;
            mmw.show();
            return app.exec();
        }
     
        // Single instance
        int main(int argc, char **argv)
        {
            QtSingleApplication app(argc, argv);
     
            if (app.isRunning())
                return !app.sendMessage(someDataString);
     
            MyMainWidget mmw;
            app.setActivationWindow(&mmw);
            mmw.show();
            return app.exec();
        }
        \endcode
     
        Once this QtSingleApplication instance is destroyed (normally when
        the process exits or crashes), when the user next attempts to run the
        application this instance will not, of course, be encountered. The
        next instance to call isRunning() or sendMessage() will assume the
        role as the new running instance.
     
        For console (non-GUI) applications, QtSingleCoreApplication may be
        used instead of this class, to avoid the dependency on the QtGui
        library.
     
        \sa QtSingleCoreApplication
    */
     
     
    void QtSingleApplication::sysInit(const QString &appId)
    {
        actWin = 0;
        peer = new QtLocalPeer(this, appId);
        connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
    }
     
     
    /*!
        Creates a QtSingleApplication object. The application identifier
        will be QCoreApplication::applicationFilePath(). \a argc, \a
        argv, and \a GUIenabled are passed on to the QAppliation constructor.
     
        If you are creating a console application (i.e. setting \a
        GUIenabled to false), you may consider using
        QtSingleCoreApplication instead.
    */
     
    QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled)
        : QApplication(argc, argv, GUIenabled)
    {
        sysInit();
    }
     
     
    /*!
        Creates a QtSingleApplication object with the application
        identifier \a appId. \a argc and \a argv are passed on to the
        QAppliation constructor.
    */
     
    QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
        : QApplication(argc, argv)
    {
        sysInit(appId);
    }
     
     
    /*!
        Creates a QtSingleApplication object. The application identifier
        will be QCoreApplication::applicationFilePath(). \a argc, \a
        argv, and \a type are passed on to the QAppliation constructor.
    */
    QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
        : QApplication(argc, argv, type)
    {
        sysInit();
    }
     
     
    #if defined(Q_WS_X11)
    /*!
      Special constructor for X11, ref. the documentation of
      QApplication's corresponding constructor. The application identifier
      will be QCoreApplication::applicationFilePath(). \a dpy, \a visual,
      and \a cmap are passed on to the QApplication constructor.
    */
    QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, visual, cmap)
    {
        sysInit();
    }
     
    /*!
      Special constructor for X11, ref. the documentation of
      QApplication's corresponding constructor. The application identifier
      will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a
      argv, \a visual, and \a cmap are passed on to the QApplication
      constructor.
    */
    QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, argc, argv, visual, cmap)
    {
        sysInit();
    }
     
    /*!
      Special constructor for X11, ref. the documentation of
      QApplication's corresponding constructor. The application identifier
      will be \a appId. \a dpy, \a argc, \a
      argv, \a visual, and \a cmap are passed on to the QApplication
      constructor.
    */
    QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, argc, argv, visual, cmap)
    {
        sysInit(appId);
    }
    #endif
     
     
    /*!
        Returns true if another instance of this application is running;
        otherwise false.
     
        This function does not find instances of this application that are
        being run by a different user (on Windows: that are running in
        another session).
     
        \sa sendMessage()
    */
     
    bool QtSingleApplication::isRunning()
    {
        return peer->isClient();
    }
     
     
    /*!
        Tries to send the text \a message to the currently running
        instance. The QtSingleApplication object in the running instance
        will emit the messageReceived() signal when it receives the
        message.
     
        This function returns true if the message has been sent to, and
        processed by, the current instance. If there is no instance
        currently running, or if the running instance fails to process the
        message within \a timeout milliseconds, this function return false.
     
        \sa isRunning(), messageReceived()
    */
    bool QtSingleApplication::sendMessage(const QString &message, int timeout)
    {
        return peer->sendMessage(message, timeout);
    }
     
     
    /*!
        Returns the application identifier. Two processes with the same
        identifier will be regarded as instances of the same application.
    */
    QString QtSingleApplication::id() const
    {
        return peer->applicationId();
    }
     
     
    /*!
      Sets the activation window of this application to \a aw. The
      activation window is the widget that will be activated by
      activateWindow(). This is typically the application's main window.
     
      If \a activateOnMessage is true (the default), the window will be
      activated automatically every time a message is received, just prior
      to the messageReceived() signal being emitted.
     
      \sa activateWindow(), messageReceived()
    */
     
    void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage)
    {
        actWin = aw;
        if (activateOnMessage)
            connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
        else
            disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
    }
     
     
    /*!
        Returns the applications activation window if one has been set by
        calling setActivationWindow(), otherwise returns 0.
     
        \sa setActivationWindow()
    */
    QWidget* QtSingleApplication::activationWindow() const
    {
        return actWin;
    }
     
     
    /*!
      De-minimizes, raises, and activates this application's activation window.
      This function does nothing if no activation window has been set.
     
      This is a convenience function to show the user that this
      application instance has been activated when he has tried to start
      another instance.
     
      This function should typically be called in response to the
      messageReceived() signal. By default, that will happen
      automatically, if an activation window has been set.
     
      \sa setActivationWindow(), messageReceived(), initialize()
    */
    void QtSingleApplication::activateWindow()
    {
        if (actWin) {
            actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
            actWin->raise();
            actWin->activateWindow();
        }
    }
     
     
    /*!
        \fn void QtSingleApplication::messageReceived(const QString& message)
     
        This signal is emitted when the current instance receives a \a
        message from another instance of this application.
     
        \sa sendMessage(), setActivationWindow(), activateWindow()
    */
     
     
    /*!
        \fn void QtSingleApplication::initialize(bool dummy = true)
     
        \obsolete
    */

  2. #2
    Invité
    Invité(e)
    Par défaut
    Bonjour

    Citation Envoyé par clairetj Voir le message
    Mais en bidouillant un peu (en écrivant #include <QtGui> et #include <QApplication)
    QApplication se trouve dans me module QtWidgets, donc plutôt :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    #include <QtWidgets/QApplication>
    Citation Envoyé par clairetj Voir le message
    Cette erreur se trouve sur la ligne suivante:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
        QtSingleApplication(int &argc, char **argv, Type type);
    Tout comme ton compilateur, je me demande d'où provient Type ?

    Autre remarque : tu utilises plusieurs prototypes du constructeur de QApplication :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled)
        : QApplication(argc, argv, GUIenabled)
     
    QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
        : QApplication(argc, argv)
     
    QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
        : QApplication(argc, argv, type) 
     
    QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, visual, cmap)
     
    QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, argc, argv, visual, cmap)
     
    QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
        : QApplication(dpy, argc, argv, visual, cmap)
    or je n'en vois qu'un dans la documentation

  3. #3
    Membre éclairé

    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    532
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2011
    Messages : 532
    Par défaut
    Comme je l'ai dit précédemment, je n'ai rien modifier dans les fichiers .h et .cpp et je vous les présente tel que je les ai obtenu donc je ne peux hélas pas te dire pourquoi plusieurs constructeurs.

  4. #4
    Invité
    Invité(e)
    Par défaut
    QSingleApplication semble dépréciée depuis Qt 5. Essaye de voir le patch en lien dans cette page.

  5. #5
    Membre éclairé

    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    532
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2011
    Messages : 532
    Par défaut
    Citation Envoyé par Winjerome Voir le message
    QSingleApplication semble dépréciée depuis Qt 5. Essaye de voir le patch en lien dans cette page.
    Merci pour le lien, je suis allez dessus, j'ai téléchargé le dossier et je l'ai inclus dans mon projet en rajoutant une ligne dans mon fichier .pro mais j'ai toujours les mêmes erreur qui reviennent. Partout où je cherche sur internet et que j'ai la possibilité de visualisé les fichiers j'ai toujours cette ligne présente (dans le fichier .h et dans le fichier .cpp c'est exactement le même problème) avec le type TYPE que le compilateur ne reconnait pas.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     QtSingleApplication(int &argc, char **argv, Type type);
    Donc est-ce que j'ai manqué quelque chose lorsque "j'installe" les fichiers, je ne comprends pas.

  6. #6
    Membre éclairé

    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2011
    Messages
    532
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 35
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Enseignement

    Informations forums :
    Inscription : Avril 2011
    Messages : 532
    Par défaut
    Problème résolu, j'avais oublié une ligne dans mon fichier .pro

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème avec la bibliothèque mysqldac!
    Par Spinoza23 dans le forum Composants VCL
    Réponses: 9
    Dernier message: 21/09/2009, 17h57
  2. [Toutes versions] Problème avec les bibliothèques de référence Outlook
    Par Thierry'' dans le forum Access
    Réponses: 3
    Dernier message: 07/05/2009, 13h14
  3. Problème avec les bibliothèques PostGreSQl
    Par madessbf dans le forum Bibliothèques
    Réponses: 0
    Dernier message: 04/11/2008, 12h25
  4. problème avec la bibliothèque multimedia microsoft
    Par oduss dans le forum Microsoft Office
    Réponses: 0
    Dernier message: 05/02/2008, 11h35
  5. Problème avec la bibliothèque glut
    Par lia dans le forum GLUT
    Réponses: 10
    Dernier message: 20/02/2006, 09h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo