Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

signals and slots without a signal

$
0
0
Hi, I have so far only created a neat looking GUI, tabbed windows, slider,dial and plot in one window and textlog in the other. I click on a start button to start simulations; The simulation runs every 2 ms, i need to update the graphs and sliders only every 100 ms. How do I signal the change? How do I even refer to the slider (compression) in the overallPerformance widget of the cprData frame? <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0">  <class>Widget</class>  <widget class="QWidget" name="Widget">   <property name="geometry">    <rect>     <x>0</x>     <y>0</y>     <width>400</width>     <height>300</height>    </rect>   </property>   <property name="windowTitle">    <string>Widget</string>   </property>   <widget class="QTabWidget" name="sessionData">    <property name="geometry">     <rect>      <x>0</x>      <y>0</y>      <width>401</width>      <height>301</height>     </rect>    </property>    <property name="currentIndex">     <number>0</number>    </property>    <widget class="QWidget" name="cprData">     <attribute name="title">      <string>CPR Performance</string>     </attribute>     <widget class="QFrame" name="overallPerformance">      <property name="geometry">       <rect>        <x>0</x>        <y>0</y>        <width>120</width>        <height>80</height>       </rect>      </property>      <property name="frameShape">       <enum>QFrame::StyledPanel</enum>      </property>      <property name="frameShadow">       <enum>QFrame::Raised</enum>      </property>      <property name="lineWidth">       <number>5</number>      </property>      <widget class="QPushButton" name="start">       <property name="geometry">        <rect>         <x>20</x>         <y>10</y>         <width>75</width>         <height>23</height>        </rect>          </widget>     </widget>     <widget class="QFrame" name="compression">      <property name="geometry">       <rect>        <x>120</x>        <y>0</y>        <width>131</width>        <height>80</height>       </rect>      </property>      <widget class="QSlider" name="compressionDepth">      QSlider::handle:vertical {      height: 10px;      background: maroon;      margin: 0 -4px; /* expand outside the groove */  }      </widget>      <widget class="QLabel" name="depth">      </widget>      <widget class="QDial" name="compressionRate">       <property name="geometry">        <rect>         <x>70</x>         <y>10</y>         <width>41</width>         <height>51</height>        </rect>       </property>      </widget>      <widget class="QLabel" name="rate">      </widget>     </widget>     <widget class="QFrame" name="ventilation">      <property name="geometry">       <rect>        <x>260</x>        <y>0</y>        <width>131</width>        <height>80</height>       </rect>      </property>      <property name="frameShape">       <enum>QFrame::StyledPanel</enum>      </property>      <property name="frameShadow">       <enum>QFrame::Raised</enum>      </property>     </widget>     <widget class="QFrame" name="graphs">      <property name="geometry">       <rect>        <x>-1</x>        <y>89</y>        <width>391</width>        <height>181</height>       </rect>      </property>      <property name="frameShape">       <enum>QFrame::StyledPanel</enum>      </property>      <property name="frameShadow">       <enum>QFrame::Raised</enum>      </property>     </widget>    </widget>    <widget class="QWidget" name="sessionLog">     <attribute name="title">      <string>Session Log</string>     </attribute>     <widget class="QFrame" name="frame_5">      <property name="geometry">       <rect>        <x>-1</x>        <y>-1</y>        <width>391</width>        <height>271</height>       </rect>      </property>      <property name="frameShape">       <enum>QFrame::StyledPanel</enum>      </property>      <property name="frameShadow">       <enum>QFrame::Raised</enum>      </property>     </widget>    </widget>   </widget>  </widget>  <layoutdefault spacing="6" margin="11"/>  <resources/>  <connections>   <connection>    <sender>Widget</sender>    <signal>objectNameChanged(QString)</signal>    <receiver>rate</receiver>    <slot>setText(QString)</slot>    <hints>     <hint type="sourcelabel">      <x>199</x>      <y>149</y>     </hint>     <hint type="destinationlabel">      <x>212</x>      <y>89</y>     </hint>    </hints>   </connection>  </connections> </ui> Any direction is much appreciated! I need to replace the simulation with hardware interface and the whole GUI to an android tablet eventually. Terrifying! thanks, kpks

Viewing all articles
Browse latest Browse all 13965

Trending Articles