Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. GUI dynamisch ändern
Forum Updated to NodeBB v4.3 + New Features

GUI dynamisch ändern

Scheduled Pinned Locked Moved Unsolved German
5 Posts 3 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nagnag
    wrote on last edited by
    #1

    hi,
    ich versuche gerade mit qtcreator ein Programm zu schreiben. Nun will ich das gui dynamisch ändern.
    ui-code:

    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
     <class>MainWindow</class>
     <widget class="QMainWindow" name="MainWindow">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>1376</width>
        <height>1074</height>
       </rect>
      </property>
      <property name="windowTitle">
       <string>MainWindow</string>
      </property>
      <widget class="QWidget" name="centralWidget">
       <widget class="QTabWidget" name="tabWidget">
        <property name="geometry">
         <rect>
          <x>-70</x>
          <y>70</y>
          <width>1631</width>
          <height>1071</height>
         </rect>
        </property>
        <property name="currentIndex">
         <number>7</number>
        </property>
        <widget class="QWidget" name="tab">
         <attribute name="title">
          <string>Datenschauer</string>
         </attribute>
         <widget class="QTextEdit" name="textEdit">
          <property name="geometry">
           <rect>
            <x>0</x>
            <y>0</y>
            <width>231</width>
            <height>621</height>
           </rect>
          </property>
          <property name="html">
           <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
    &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
    p, li { white-space: pre-wrap; }
    &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
    &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Datenordner&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
         </widget>
         <widget class="QTextEdit" name="textEdit_2">
          <property name="geometry">
           <rect>
            <x>230</x>
            <y>0</y>
            <width>711</width>
            <height>641</height>
           </rect>
          </property>
          <property name="html">
           <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
    &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
    p, li { white-space: pre-wrap; }
    &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
    &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;skript-editor&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
         </widget>
        </widget>
        <widget class="QWidget" name="tab_2">
         <attribute name="title">
          <string>Spielstart</string>
         </attribute>
        </widget>
        <widget class="QWidget" name="waren">
         <attribute name="title">
          <string>Waren/Stationen</string>
         </attribute>
         <widget class="QTextEdit" name="textEdit_3">
          <property name="geometry">
           <rect>
            <x>0</x>
            <y>0</y>
            <width>211</width>
            <height>1111</height>
           </rect>
          </property>
          <property name="html">
           <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
    &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
    p, li { white-space: pre-wrap; }
    &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
    &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Warenauswahl&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
         </widget>
         <widget class="QLabel" name="label">
          <property name="geometry">
           <rect>
            <x>210</x>
            <y>0</y>
            <width>91</width>
            <height>16</height>
           </rect>
          </property>
          <property name="text">
           <string>Warenname:</string>
          </property>
         </widget>
         <widget class="QLineEdit" name="lineEdit">
          <property name="geometry">
           <rect>
            <x>300</x>
            <y>0</y>
            <width>113</width>
            <height>25</height>
           </rect>
          </property>
         </widget>
        </widget>
        <widget class="QWidget" name="tab_3">
         <attribute name="title">
          <string>menu</string>
         </attribute>
        </widget>
        <widget class="QWidget" name="tab_4">
         <attribute name="title">
          <string>Software</string>
         </attribute>
        </widget>
        <widget class="QWidget" name="mb">
         <attribute name="title">
          <string>Mission-Aurträge</string>
         </attribute>
        </widget>
        <widget class="QWidget" name="tab_5">
         <attribute name="title">
          <string>schiff</string>
         </attribute>
        </widget>
        <widget class="QWidget" name="tab_6">
         <attribute name="title">
          <string>Faktionen</string>
         </attribute>
         <widget class="QPushButton" name="pushButton">
          <property name="geometry">
           <rect>
            <x>0</x>
            <y>0</y>
            <width>121</width>
            <height>25</height>
           </rect>
          </property>
          <property name="text">
           <string>Dateien einlesen</string>
          </property>
          <property name="autoDefault">
           <bool>false</bool>
          </property>
         </widget>
    //anfang gehört in den slot code 
         <widget class="QLabel" name="label_2">
          <property name="geometry">
           <rect>
            <x>0</x>
            <y>40</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Faktion:</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_3">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>40</y>
            <width>91</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>plutarch(id)</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_4">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>60</y>
            <width>111</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>namen-nummer</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_5">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>60</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_6">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>80</y>
            <width>101</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Beschreibung</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_7">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>80</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_8">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>100</y>
            <width>91</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Kurzname</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_9">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>100</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_10">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>120</y>
            <width>91</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Hauptrasse</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_11">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>120</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_12">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>140</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Lizensen:</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_13">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>140</y>
            <width>131</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Lizensbeschreibung</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_14">
          <property name="geometry">
           <rect>
            <x>310</x>
            <y>140</y>
            <width>111</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>namen-nummer</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_15">
          <property name="geometry">
           <rect>
            <x>420</x>
            <y>140</y>
            <width>31</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_16">
          <property name="geometry">
           <rect>
            <x>460</x>
            <y>140</y>
            <width>151</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Beschreibungsnummer</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_17">
          <property name="geometry">
           <rect>
            <x>620</x>
            <y>140</y>
            <width>41</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_18">
          <property name="geometry">
           <rect>
            <x>660</x>
            <y>140</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Ansehen:</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_19">
          <property name="geometry">
           <rect>
            <x>730</x>
            <y>140</y>
            <width>31</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_20">
          <property name="geometry">
           <rect>
            <x>770</x>
            <y>140</y>
            <width>41</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Preis</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_21">
          <property name="geometry">
           <rect>
            <x>820</x>
            <y>140</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_22">
          <property name="geometry">
           <rect>
            <x>60</x>
            <y>160</y>
            <width>101</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Beziehungen:</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_23">
          <property name="geometry">
           <rect>
            <x>170</x>
            <y>160</y>
            <width>101</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>Faktionsname</string>
          </property>
         </widget>
         <widget class="QLabel" name="label_24">
          <property name="geometry">
           <rect>
            <x>280</x>
            <y>160</y>
            <width>64</width>
            <height>17</height>
           </rect>
          </property>
          <property name="text">
           <string>int</string>
          </property>
         </widget>
        </widget>
       </widget>
      </widget>
    //ende gehört in den slotcode 
      <widget class="QMenuBar" name="menuBar">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>1376</width>
         <height>22</height>
        </rect>
       </property>
       <widget class="QMenu" name="menux_skripter">
        <property name="title">
         <string>x - skripter</string>
        </property>
        <addaction name="separator"/>
        <addaction name="actionload_data"/>
       </widget>
       <addaction name="menux_skripter"/>
      </widget>
      <widget class="QToolBar" name="mainToolBar">
       <attribute name="toolBarArea">
        <enum>TopToolBarArea</enum>
       </attribute>
       <attribute name="toolBarBreak">
        <bool>false</bool>
       </attribute>
      </widget>
      <widget class="QStatusBar" name="statusBar"/>
      <action name="actionload_data">
       <property name="text">
        <string>load data</string>
       </property>
      </action>
     </widget>
     <layoutdefault spacing="6" margin="11"/>
     <resources/>
     <connections/>
    </ui>
    
    

    Problem:
    ich habe keine Ahnung wie ich den Code dynamisch (während der laufzeit)

    schlechte lösungsansetze:

    • Ein extra programm schreiben das die GUI schreibt und dann das Programm neu gestartet bzw. compelieren.
    aha_1980A 1 Reply Last reply
    0
    • N nagnag

      hi,
      ich versuche gerade mit qtcreator ein Programm zu schreiben. Nun will ich das gui dynamisch ändern.
      ui-code:

      <?xml version="1.0" encoding="UTF-8"?>
      <ui version="4.0">
       <class>MainWindow</class>
       <widget class="QMainWindow" name="MainWindow">
        <property name="geometry">
         <rect>
          <x>0</x>
          <y>0</y>
          <width>1376</width>
          <height>1074</height>
         </rect>
        </property>
        <property name="windowTitle">
         <string>MainWindow</string>
        </property>
        <widget class="QWidget" name="centralWidget">
         <widget class="QTabWidget" name="tabWidget">
          <property name="geometry">
           <rect>
            <x>-70</x>
            <y>70</y>
            <width>1631</width>
            <height>1071</height>
           </rect>
          </property>
          <property name="currentIndex">
           <number>7</number>
          </property>
          <widget class="QWidget" name="tab">
           <attribute name="title">
            <string>Datenschauer</string>
           </attribute>
           <widget class="QTextEdit" name="textEdit">
            <property name="geometry">
             <rect>
              <x>0</x>
              <y>0</y>
              <width>231</width>
              <height>621</height>
             </rect>
            </property>
            <property name="html">
             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
      &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
      p, li { white-space: pre-wrap; }
      &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
      &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Datenordner&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
            </property>
           </widget>
           <widget class="QTextEdit" name="textEdit_2">
            <property name="geometry">
             <rect>
              <x>230</x>
              <y>0</y>
              <width>711</width>
              <height>641</height>
             </rect>
            </property>
            <property name="html">
             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
      &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
      p, li { white-space: pre-wrap; }
      &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
      &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;skript-editor&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
            </property>
           </widget>
          </widget>
          <widget class="QWidget" name="tab_2">
           <attribute name="title">
            <string>Spielstart</string>
           </attribute>
          </widget>
          <widget class="QWidget" name="waren">
           <attribute name="title">
            <string>Waren/Stationen</string>
           </attribute>
           <widget class="QTextEdit" name="textEdit_3">
            <property name="geometry">
             <rect>
              <x>0</x>
              <y>0</y>
              <width>211</width>
              <height>1111</height>
             </rect>
            </property>
            <property name="html">
             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
      &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
      p, li { white-space: pre-wrap; }
      &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
      &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Warenauswahl&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
            </property>
           </widget>
           <widget class="QLabel" name="label">
            <property name="geometry">
             <rect>
              <x>210</x>
              <y>0</y>
              <width>91</width>
              <height>16</height>
             </rect>
            </property>
            <property name="text">
             <string>Warenname:</string>
            </property>
           </widget>
           <widget class="QLineEdit" name="lineEdit">
            <property name="geometry">
             <rect>
              <x>300</x>
              <y>0</y>
              <width>113</width>
              <height>25</height>
             </rect>
            </property>
           </widget>
          </widget>
          <widget class="QWidget" name="tab_3">
           <attribute name="title">
            <string>menu</string>
           </attribute>
          </widget>
          <widget class="QWidget" name="tab_4">
           <attribute name="title">
            <string>Software</string>
           </attribute>
          </widget>
          <widget class="QWidget" name="mb">
           <attribute name="title">
            <string>Mission-Aurträge</string>
           </attribute>
          </widget>
          <widget class="QWidget" name="tab_5">
           <attribute name="title">
            <string>schiff</string>
           </attribute>
          </widget>
          <widget class="QWidget" name="tab_6">
           <attribute name="title">
            <string>Faktionen</string>
           </attribute>
           <widget class="QPushButton" name="pushButton">
            <property name="geometry">
             <rect>
              <x>0</x>
              <y>0</y>
              <width>121</width>
              <height>25</height>
             </rect>
            </property>
            <property name="text">
             <string>Dateien einlesen</string>
            </property>
            <property name="autoDefault">
             <bool>false</bool>
            </property>
           </widget>
      //anfang gehört in den slot code 
           <widget class="QLabel" name="label_2">
            <property name="geometry">
             <rect>
              <x>0</x>
              <y>40</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Faktion:</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_3">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>40</y>
              <width>91</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>plutarch(id)</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_4">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>60</y>
              <width>111</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>namen-nummer</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_5">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>60</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_6">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>80</y>
              <width>101</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Beschreibung</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_7">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>80</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_8">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>100</y>
              <width>91</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Kurzname</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_9">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>100</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_10">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>120</y>
              <width>91</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Hauptrasse</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_11">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>120</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_12">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>140</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Lizensen:</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_13">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>140</y>
              <width>131</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Lizensbeschreibung</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_14">
            <property name="geometry">
             <rect>
              <x>310</x>
              <y>140</y>
              <width>111</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>namen-nummer</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_15">
            <property name="geometry">
             <rect>
              <x>420</x>
              <y>140</y>
              <width>31</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_16">
            <property name="geometry">
             <rect>
              <x>460</x>
              <y>140</y>
              <width>151</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Beschreibungsnummer</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_17">
            <property name="geometry">
             <rect>
              <x>620</x>
              <y>140</y>
              <width>41</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_18">
            <property name="geometry">
             <rect>
              <x>660</x>
              <y>140</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Ansehen:</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_19">
            <property name="geometry">
             <rect>
              <x>730</x>
              <y>140</y>
              <width>31</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_20">
            <property name="geometry">
             <rect>
              <x>770</x>
              <y>140</y>
              <width>41</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Preis</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_21">
            <property name="geometry">
             <rect>
              <x>820</x>
              <y>140</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_22">
            <property name="geometry">
             <rect>
              <x>60</x>
              <y>160</y>
              <width>101</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Beziehungen:</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_23">
            <property name="geometry">
             <rect>
              <x>170</x>
              <y>160</y>
              <width>101</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>Faktionsname</string>
            </property>
           </widget>
           <widget class="QLabel" name="label_24">
            <property name="geometry">
             <rect>
              <x>280</x>
              <y>160</y>
              <width>64</width>
              <height>17</height>
             </rect>
            </property>
            <property name="text">
             <string>int</string>
            </property>
           </widget>
          </widget>
         </widget>
        </widget>
      //ende gehört in den slotcode 
        <widget class="QMenuBar" name="menuBar">
         <property name="geometry">
          <rect>
           <x>0</x>
           <y>0</y>
           <width>1376</width>
           <height>22</height>
          </rect>
         </property>
         <widget class="QMenu" name="menux_skripter">
          <property name="title">
           <string>x - skripter</string>
          </property>
          <addaction name="separator"/>
          <addaction name="actionload_data"/>
         </widget>
         <addaction name="menux_skripter"/>
        </widget>
        <widget class="QToolBar" name="mainToolBar">
         <attribute name="toolBarArea">
          <enum>TopToolBarArea</enum>
         </attribute>
         <attribute name="toolBarBreak">
          <bool>false</bool>
         </attribute>
        </widget>
        <widget class="QStatusBar" name="statusBar"/>
        <action name="actionload_data">
         <property name="text">
          <string>load data</string>
         </property>
        </action>
       </widget>
       <layoutdefault spacing="6" margin="11"/>
       <resources/>
       <connections/>
      </ui>
      
      

      Problem:
      ich habe keine Ahnung wie ich den Code dynamisch (während der laufzeit)

      schlechte lösungsansetze:

      • Ein extra programm schreiben das die GUI schreibt und dann das Programm neu gestartet bzw. compelieren.
      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      @nagnag hi,

      wenn du ein wenig tiefer nachsiehst, wirst du merken, dass die .ui von einem programm namens uic in eine Datei ui_xxx.h umgewandelt wird.

      In dieser Datei steht dann der Code, der die UI erzeugt. Genauso kann eine UI auch rein per Programm erzeugt werden, bzw. gemischt per Designer und Programm.

      Das ist aber alles gut dokumentiert bzw. wird auch in den Büchern abgehandelt.

      Grüsse

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • N Offline
        N Offline
        nagnag
        wrote on last edited by
        #3

        danke für die Information hat mir gut geholfen.
        Hab die bin-Dateien gefunden. Sie waren nicht in einem subverzeichnis so war es nicht gleich ofentsichtlich. Aber durch wahrloses klicken durch die qtcreatortabs hab ich es gefunden.
        Ich weiß jetzt nicht wie ich Designer + Programm ins zusammenspiel kommt aber ich hab jetzt die ui_main.h geändert und werkel nun mich nun langsam durch die Makefile. so in ein paar Tage kann ich mehr sagen.

        jsulmJ aha_1980A 2 Replies Last reply
        0
        • N nagnag

          danke für die Information hat mir gut geholfen.
          Hab die bin-Dateien gefunden. Sie waren nicht in einem subverzeichnis so war es nicht gleich ofentsichtlich. Aber durch wahrloses klicken durch die qtcreatortabs hab ich es gefunden.
          Ich weiß jetzt nicht wie ich Designer + Programm ins zusammenspiel kommt aber ich hab jetzt die ui_main.h geändert und werkel nun mich nun langsam durch die Makefile. so in ein paar Tage kann ich mehr sagen.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @nagnag Vergiss nicht dass ui_* Dateien generiert werden. Das heißt: sobald du wieder baust und diese Dateien wieder generiert werden sind alle deine Änderungen weg.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • N nagnag

            danke für die Information hat mir gut geholfen.
            Hab die bin-Dateien gefunden. Sie waren nicht in einem subverzeichnis so war es nicht gleich ofentsichtlich. Aber durch wahrloses klicken durch die qtcreatortabs hab ich es gefunden.
            Ich weiß jetzt nicht wie ich Designer + Programm ins zusammenspiel kommt aber ich hab jetzt die ui_main.h geändert und werkel nun mich nun langsam durch die Makefile. so in ein paar Tage kann ich mehr sagen.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @nagnag

            Vielleicht zum Einstieg ganz gut: https://www.bogotobogo.com/Qt/Qt5_LayoutNotUsingDesigner.php

            Ist in Englisch, sollte aber gut nachvollziehbar sein.

            Qt has to stay free or it will die.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved