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

Qt Discussion :

Compilation d'un Custom Widget pour QtCreator sous Mac


Sujet :

Qt

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2007
    Messages : 19
    Par défaut Compilation d'un Custom Widget pour QtCreator sous Mac
    Bonjour à tous,

    J'ai un souci avec Qt Creator sous Mac.
    J'ai créé un Custom Widget qui doit s'intégrer au designer.

    Celui-ci s'intègre très bien avec Qt Designer, mais lorsque je souhaite l'ajouter au designer de QtCreator, ce dernier plante lors du lancement du designer.

    Est-ce que vous auriez des idées pour résoudre ce problème?

    Je peux poster le code du custom widget si nécessaire (il fonctionne sur Qt Designer sous Mac et Windows et sous Qt Creator si compilé avec msvc sous Windows)
    Voici le crash log :

    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
    Process:         QtCreator [690]
    Path:            /Developer/Applications/Qt/QtCreator.app/Contents/MacOS/QtCreator
    Identifier:      com.nokia.qtcreator
    Version:         1.1.0 (1.1.0)
    Code Type:       X86 (Native)
    Parent Process:  launchd [120]
     
    Interval Since Last Report:          29537 sec
    Crashes Since Last Report:           1
    Per-App Interval Since Last Report:  17636 sec
    Per-App Crashes Since Last Report:   1
     
    Date/Time:       2009-06-02 12:36:08.235 +0200
    OS Version:      Mac OS X 10.5.7 (9J61)
    Report Version:  6
    Anonymous UUID:  045138E0-8B70-4156-BCD7-B492682EE430
     
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Crashed Thread:  0
     
    Thread 0 Crashed:
    0   libSystem.B.dylib             	0x95926e42 __kill + 10
    1   libSystem.B.dylib             	0x9599923a raise + 26
    2   libSystem.B.dylib             	0x959a5679 abort + 73
    3   QtCore                        	0x1d63d215 qt_message_output(QtMsgType, char const*) + 149
    4   QtCore                        	0x1d63d309 qFatal(char const*, ...) + 105
    5   QtGui                         	0x1cc348f1 QWidgetPrivate::QWidgetPrivate(int) + 801
    6   QtGui                         	0x1cc45596 QWidget::QWidget(QWidget*, QFlags<Qt::WindowType>) + 54
    7   libCustomPenduWidget.dylib    	0x1c3f38c6 PenduWidget::PenduWidget(QWidget*) + 50
    8   libCustomPenduWidget.dylib    	0x1c3f3df1 CustomPenduWidget::createWidget(QWidget*) + 41
    9   libQtDesigner.4.5.1.dylib     	0x1abc35dc qdesigner_internal::WidgetFactory::createCustomWidget(QString const&, QWidget*, bool*) const + 74
    10  libQtDesigner.4.5.1.dylib     	0x1abc3b68 qdesigner_internal::WidgetFactory::createWidget(QString const&, QWidget*) const + 116
    11  libQtDesigner.4.5.1.dylib     	0x1abc79dc qdesigner_internal::WidgetDataBase::defaultPropertyValues(QString const&) + 88
    12  libQtDesigner.4.5.1.dylib     	0x1abc7b96 qdesigner_internal::WidgetDataBase::grabDefaultPropertyValues() + 100
    13  libDesigner.dylib             	0x1aa7bf43 Designer::Internal::FormEditorW::fullInit() + 195
    14  libDesigner.dylib             	0x1aa7e23d Designer::Internal::FormEditorW::ensureInitStage(Designer::Internal::FormEditorW::InitializationStage) + 129
    15  libDesigner.dylib             	0x1aa7e276 Designer::Internal::FormEditorW::instance() + 24
    16  libDesigner.dylib             	0x1aa734c9 Designer::Internal::FormEditorFactory::createEditor(QWidget*) + 15
    17  libCore.dylib                 	0x00636c82 Core::EditorManager::createEditor(QString const&, QString const&) + 872
    18  libCore.dylib                 	0x00639d36 Core::EditorManager::openEditor(QString const&, QString const&, QFlags<Core::EditorManager::OpenEditorFlag>) + 208
    19  libProjectExplorer.dylib      	0x1a2fae4e ProjectExplorer::Internal::ProjectTreeWidget::openItem(QModelIndex const&) + 134
    20  libProjectExplorer.dylib      	0x1a315df8 ProjectExplorer::Internal::ProjectTreeWidget::qt_metacall(QMetaObject::Call, int, void**) + 338
    21  libQtCore.4.5.1.dylib         	0x003e49b9 QMetaObject::activate(QObject*, int, int, void**) + 541
    22  libQtGui.4.5.1.dylib          	0x010e8b85 QAbstractItemView::activated(QModelIndex const&) + 61
    23  libQtGui.4.5.1.dylib          	0x01131c37 QTreeView::mouseDoubleClickEvent(QMouseEvent*) + 851
    24  libQtGui.4.5.1.dylib          	0x00cb1208 QWidget::event(QEvent*) + 2394
    25  libQtGui.4.5.1.dylib          	0x00fe0f45 QFrame::event(QEvent*) + 33
    26  libQtGui.4.5.1.dylib          	0x0106e7f3 QAbstractScrollArea::viewportEvent(QEvent*) + 421
    27  libQtGui.4.5.1.dylib          	0x010f6020 QAbstractItemView::viewportEvent(QEvent*) + 1626
    28  libQtGui.4.5.1.dylib          	0x0113569e QTreeView::viewportEvent(QEvent*) + 580
    29  libQtGui.4.5.1.dylib          	0x01299510 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) + 48
    30  libQtCore.4.5.1.dylib         	0x003d3d7a QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 144
    31  libQtGui.4.5.1.dylib          	0x00c66ca7 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 135
    32  libQtGui.4.5.1.dylib          	0x00c6ff64 QApplication::notify(QObject*, QEvent*) + 3348
    33  libQtCore.4.5.1.dylib         	0x003d3c31 QCoreApplication::notifyInternal(QObject*, QEvent*) + 99
    34  libQtGui.4.5.1.dylib          	0x00c09641 QApplicationPrivate::globalEventProcessor(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 4711
    35  com.apple.HIToolbox           	0x932c911d DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1181
    36  com.apple.HIToolbox           	0x932c855b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
    37  com.apple.HIToolbox           	0x932e4eac SendEventToEventTarget + 52
    38  libQtGui.4.5.1.dylib          	0x00c1911f QWidgetPrivate::qt_window_event(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1521
    39  com.apple.HIToolbox           	0x932c911d DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1181
    40  com.apple.HIToolbox           	0x932c855b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
    41  com.apple.HIToolbox           	0x932e4eac SendEventToEventTarget + 52
    42  com.apple.HIToolbox           	0x932f7088 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1208
    43  com.apple.HIToolbox           	0x932c94d6 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2134
    44  com.apple.HIToolbox           	0x932c855b SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 405
    45  com.apple.HIToolbox           	0x932e4eac SendEventToEventTarget + 52
    46  libQtGui.4.5.1.dylib          	0x00c1c1f5 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 589
    47  libQtCore.4.5.1.dylib         	0x003d3495 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 63
    48  libQtCore.4.5.1.dylib         	0x003d361b QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 149
    49  libQtCore.4.5.1.dylib         	0x003d4e14 QCoreApplication::exec() + 160
    50  com.nokia.qtcreator           	0x000080ec main + 5008
    51  com.nokia.qtcreator           	0x00004d1a _start + 216
    52  com.nokia.qtcreator           	0x00004c41 start + 41
     
    Thread 1:
    0   libSystem.B.dylib             	0x959086fa select$DARWIN_EXTSN + 10
    1   libSystem.B.dylib             	0x958ea155 _pthread_start + 321
    2   libSystem.B.dylib             	0x958ea012 thread_start + 34
     
    Thread 2:
    0   libSystem.B.dylib             	0x958b92e6 semaphore_timedwait_signal_trap + 10
    1   libSystem.B.dylib             	0x958eb2af _pthread_cond_wait + 1244
    2   libSystem.B.dylib             	0x95935aab pthread_cond_timedwait + 47
    3   libQtCore.4.5.1.dylib         	0x002f44f6 QWaitCondition::wait(QMutex*, unsigned long) + 274
    4   libQtCore.4.5.1.dylib         	0x002eb5cb QThreadPoolThread::run() + 493
    5   libQtCore.4.5.1.dylib         	0x002f3134 QThreadPrivate::start(void*) + 202
    6   libSystem.B.dylib             	0x958ea155 _pthread_start + 321
    7   libSystem.B.dylib             	0x958ea012 thread_start + 34
     
    Thread 3:
    0   libSystem.B.dylib             	0x958f03ca select$DARWIN_EXTSN$NOCANCEL + 10
    1   libQtCore.4.5.1.dylib         	0x003b51f8 QProcessManager::run() + 116
    2   libQtCore.4.5.1.dylib         	0x002f3134 QThreadPrivate::start(void*) + 202
    3   libSystem.B.dylib             	0x958ea155 _pthread_start + 321
    4   libSystem.B.dylib             	0x958ea012 thread_start + 34
     
    Thread 4:
    0   libSystem.B.dylib             	0x958e99c6 kevent + 10
    1   libQtCore.4.5.1.dylib         	0x002f3134 QThreadPrivate::start(void*) + 202
    2   libSystem.B.dylib             	0x958ea155 _pthread_start + 321
    3   libSystem.B.dylib             	0x958ea012 thread_start + 34
     
    Thread 0 crashed with X86 Thread State (32-bit):
      eax: 0x00000000  ebx: 0x959a5639  ecx: 0xbfffd88c  edx: 0x95926e42
      edi: 0x00000000  esi: 0x00000003  ebp: 0xbfffd8a8  esp: 0xbfffd88c
       ss: 0x0000001f  efl: 0x00000286  eip: 0x95926e42   cs: 0x00000007
       ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
      cr2: 0xa06d5880

  2. #2
    Membre expérimenté Avatar de MacPro
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut
    salut, je veux bien le tester sur mon Mac pour toi si tu veux.

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2007
    Messages : 19
    Par défaut
    Merci de ton aide.
    Les sources sont jointes à ce message.
    Il te faut compiler la première série puis mettre la librairie générée dans l'application QtCreator (dans le paquet, sous > Contents > MacOS > designer).

    Tu peux aussi tester avec QtDesigner tout seul en plaçant la librairie dans plugins > designer.

    Je suis ouvert à toutes les suggestions pour résoudre le problème.
    Fichiers attachés Fichiers attachés

  4. #4
    Membre expérimenté Avatar de MacPro
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut
    fallait m'envoyer un mp, j'aurais regardé ça avant.
    J'ai compilé ton customwidgetplugin. Il fonctionne bien sur Qt Designer.
    j'ai compilé ton programme de test, il fonctionne aussi.
    j'ai édité un .ui qvec QtCreator et effectivement, ton plugin n'est pas dans la liste de Designer de QtCreator.
    En copiant ton plugin dans la package QtCreator/Contents/MacOS/designer, QtCreator démarre quand même. Je peux même éditer un .ui sans que ça plante. Malheureusement ton plugin n'est pas dans la liste.

    D'après trolltech :

    Qt Creator doesn’t pull in custom widgets from the Qt version you use for development. You need to make sure that your custom widget plugins work with the Qt version that Qt Creator was built with (see the “About QtCreator” dialog, currently 4.5), and put your plugin libraries to Qt Creator’s designer plugin location (bin/designer on Windows and Linux, QtCreator.app/Contents/MacOS/designer on Mac).
    Ptêtre que ton problème est là dedans. Personnellement, j'utilise Qt Designer directement, je passe pas par la version intégrée.
    Si tu trouves, reviens nous dire

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Décembre 2007
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2007
    Messages : 19
    Par défaut
    Merci d'avoir pu tester.

    You need to make sure that your custom widget plugins work with the Qt version that Qt Creator was built with
    Il y a un souci de compilateur ou de sdk à priori.

    J'utilise Qt Creator 1.1.0, compilé avec Qt 4.5.1. Mon custom widget est compilé avec Qt 4.5.1 et mkspec et macx-g++.

    Je suppose que Qt Creator n'a pas été compilé avec macx-g++ mais avec un autre compilateur (même problème sous Windows où QtCreator a été compilé avec msvc).

    Est-ce que quelqu'un connaît quel compilateur a été utilisé pour QtCreator?

  6. #6
    Membre expérimenté Avatar de MacPro
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut
    si tu tiens tant que ça à le tester, tu peux toujours essayer de compiler directement les sources de Qt et QtCreator si possible.

Discussions similaires

  1. Configuration pour sendmail sous Mac OS X
    Par andaman dans le forum Langage
    Réponses: 1
    Dernier message: 27/12/2010, 08h09
  2. Réponses: 4
    Dernier message: 27/09/2009, 20h22
  3. Réponses: 3
    Dernier message: 27/04/2009, 16h53
  4. Compiler pour Windows sous Linux
    Par YuGiOhJCJ dans le forum Choisir un environnement de développement
    Réponses: 11
    Dernier message: 05/09/2007, 19h40
  5. [Debutant] Compiler un serlvet pour tomcat sous windows
    Par Braz dans le forum Tomcat et TomEE
    Réponses: 3
    Dernier message: 22/01/2006, 00h46

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