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 :

Qt et interface généré en XML avec le designer d'IHM


Sujet :

Qt

  1. #1
    Membre confirmé
    Avatar de geforce
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Janvier 2010
    Messages
    1 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Janvier 2010
    Messages : 1 055
    Points : 559
    Points
    559
    Par défaut Qt et interface généré en XML avec le designer d'IHM
    Bonjour,

    je viens de réalisé une IHM avec le designer de QT, mais je n'arrive pas à trouver comment exploiter cette IHM (Elle est enregistré en extension .jui qui est à l'intérieur du XML)

    Exemple:
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0" language="jambi">
     <class>Dialog</class>
     <widget class="QDialog" name="Dialog">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>500</width>
        <height>300</height>
       </rect>
      </property>
      <property name="windowTitle">
       <string>Dialog</string>
      </property>
      <widget class="QDialogButtonBox" name="buttonBox">
       <property name="geometry">
        <rect>
         <x>30</x>
         <y>240</y>
         <width>341</width>
         <height>32</height>
        </rect>
       </property>
       <property name="orientation">
        <enum>com.trolltech.qt.core.Qt.Orientation.Horizontal</enum>
       </property>
       <property name="standardButtons">
        <set>com.trolltech.qt.gui.QDialogButtonBox.StandardButton.Cancel|com.trolltech.qt.gui.QDialogButtonBox.StandardButton.Ok</set>
       </property>
      </widget>
      <widget class="QCommandLinkButton" name="commandLinkButton">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>168</width>
         <height>41</height>
        </rect>
       </property>
       <property name="text">
        <string>CommandLinkButton</string>
       </property>
      </widget>
      <widget class="QWidget" name="verticalLayoutWidget">
       <property name="geometry">
        <rect>
         <x>10</x>
         <y>40</y>
         <width>261</width>
         <height>161</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout">
        <property name="margin">
         <number>4</number>
        </property>
       </layout>
      </widget>
      <widget class="QCheckBox" name="checkBox">
       <property name="geometry">
        <rect>
         <x>300</x>
         <y>50</y>
         <width>72</width>
         <height>18</height>
        </rect>
       </property>
       <property name="text">
        <string>CheckBox</string>
       </property>
      </widget>
      <widget class="QToolButton" name="toolButton">
       <property name="geometry">
        <rect>
         <x>10</x>
         <y>210</y>
         <width>25</width>
         <height>20</height>
        </rect>
       </property>
       <property name="text">
        <string>...</string>
       </property>
      </widget>
     </widget>
     <resources/>
     <connections>
      <connection>
       <sender>buttonBox</sender>
       <signal>accepted</signal>
       <receiver>Dialog</receiver>
       <slot>accept()</slot>
       <hints>
        <hint type="sourcelabel">
         <x>248</x>
         <y>254</y>
        </hint>
        <hint type="destinationlabel">
         <x>157</x>
         <y>274</y>
        </hint>
       </hints>
      </connection>
      <connection>
       <sender>buttonBox</sender>
       <signal>rejected</signal>
       <receiver>Dialog</receiver>
       <slot>reject()</slot>
       <hints>
        <hint type="sourcelabel">
         <x>316</x>
         <y>260</y>
        </hint>
        <hint type="destinationlabel">
         <x>286</x>
         <y>274</y>
        </hint>
       </hints>
      </connection>
     </connections>
    </ui>
    si quelqu'un peut donner comment faire la relation entre la vue et le Model ?

    Merci d'avance

  2. #2
    Expert éminent sénior
    Avatar de Sve@r
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Février 2006
    Messages
    12 689
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Février 2006
    Messages : 12 689
    Points : 30 983
    Points
    30 983
    Billets dans le blog
    1
    Par défaut
    Salut

    T'as créé ton IHM avec QDesigner. Maintenant, soit tu veux l'intégrer dans un source C++, soit tu veux l'intégrer dans un source Python

    Dans le premier cas tu tapes la commande uic [ton fichier XML] => ça te génèrera le code C++
    Dnas le second cas, tu tapes la commande pyuic [ton fichier XML] => ça te génèrera le code Python
    Mon Tutoriel sur la programmation «Python»
    Mon Tutoriel sur la programmation «Shell»
    Sinon il y en a pleins d'autres. N'oubliez pas non plus les différentes faq disponibles sur ce site
    Et on poste ses codes entre balises [code] et [/code]

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

Discussions similaires

  1. Réponses: 1
    Dernier message: 28/09/2010, 20h52
  2. JAXWS wsimport & mapping xml avec interfaces java
    Par ZZelle dans le forum Services Web
    Réponses: 0
    Dernier message: 23/04/2010, 17h11
  3. [XML][XSL][FOP] transformation xml avec fop
    Par Le Marlou dans le forum XSL/XSLT/XPATH
    Réponses: 4
    Dernier message: 05/12/2003, 16h58
  4. []générer et LIRE du xml avec vb: sélection d'un node
    Par chris21 dans le forum VB 6 et antérieur
    Réponses: 11
    Dernier message: 19/09/2003, 13h14
  5. generer xsl depuis xml avec balises inconues ?
    Par cedre dans le forum XSL/XSLT/XPATH
    Réponses: 7
    Dernier message: 24/06/2003, 09h00

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