How can i update the values repeadedly?



  • please help me. i am completle lost here. totaly new to qt.

    I have this ui file and I want the lcd values to be updated every 100ms from the last line of 4 files :
    value1.txt
    value2.txt
    value3.txt
    message_box.txt

    never end. just update every 100ms. I don't care if it is in C++, python, Greek, English, Marcian. Just update the values from the last line of the files.

    please help.

    this is the 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>460</width>
        <height>320</height>
       </rect>
      </property>
      <property name="windowTitle">
       <string>MainWindow</string>
      </property>
      <widget class="QWidget" name="centralwidget">
       <widget class="QLCDNumber" name="value3">
        <property name="geometry">
         <rect>
          <x>330</x>
          <y>160</y>
          <width>121</width>
          <height>101</height>
         </rect>
        </property>
       </widget>
       <widget class="QLCDNumber" name="value2">
        <property name="geometry">
         <rect>
          <x>170</x>
          <y>160</y>
          <width>121</width>
          <height>101</height>
         </rect>
        </property>
       </widget>
       <widget class="QLCDNumber" name="value1">
        <property name="geometry">
         <rect>
          <x>20</x>
          <y>160</y>
          <width>121</width>
          <height>101</height>
         </rect>
        </property>
       </widget>
       <widget class="QLabel" name="value1_lb">
        <property name="geometry">
         <rect>
          <x>70</x>
          <y>130</y>
          <width>55</width>
          <height>16</height>
         </rect>
        </property>
        <property name="text">
         <string>value1</string>
        </property>
       </widget>
       <widget class="QLabel" name="value2_lb">
        <property name="geometry">
         <rect>
          <x>190</x>
          <y>130</y>
          <width>81</width>
          <height>21</height>
         </rect>
        </property>
        <property name="text">
         <string>value2</string>
        </property>
       </widget>
       <widget class="QLabel" name="Value3_lb">
        <property name="geometry">
         <rect>
          <x>350</x>
          <y>130</y>
          <width>91</width>
          <height>21</height>
         </rect>
        </property>
        <property name="text">
         <string>Value3</string>
        </property>
       </widget>
       <widget class="QTextBrowser" name="message_box">
        <property name="geometry">
         <rect>
          <x>10</x>
          <y>10</y>
          <width>441</width>
          <height>121</height>
         </rect>
        </property>
       </widget>
      </widget>
      <widget class="QMenuBar" name="menubar">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>460</width>
         <height>26</height>
        </rect>
       </property>
      </widget>
      <widget class="QStatusBar" name="statusbar"/>
     </widget>
     <resources/>
     <connections/>
    </ui>
    

  • Lifetime Qt Champion

    Hi,

    Take a look at:

    • QTimer for the "repeating never ending part".
    • QFile for reading your files.

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.