Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved a qml problem

    QML and Qt Quick
    qml
    2
    3
    452
    Loading More Posts
    • 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.
    • samsher
      samsher last edited by

      QML Problem:
      Write an application in QML, which has a multi line text box, one button and a text field.

      As soon as the application is started, a timer should start in C++ code and update the textfield defined in QML.

      Entering text in the text area and pressing the button should write the string in the text area to a file.

      stackprogramer 1 Reply Last reply Reply Quote 0
      • stackprogramer
        stackprogramer @samsher last edited by stackprogramer

        @samsher for creation a timer you can use this type

        Item {
                Timer {
                    interval: 500; running: true; repeat: true
        
                  onTriggered: time.text =Date().toString()
        
        
                }
        
                Text { id: time
                x:95
                y:120
        
                }
            }
        

        for creation a textinput you can use

        TextInput { text: "Hello"; font.capitalization: Font.AllLowercase }
        

        Qpushbutton

        QPushButton#evilButton { background-color: red }
        

        all thing is easy in qml Qt,some try.

        1 Reply Last reply Reply Quote 0
        • samsher
          samsher last edited by

          thank you sir,
          can you please also elaborate how can i sort out this problem , "** Entering text in the text area and pressing the button should write the string in the text area to a file**".

          1 Reply Last reply Reply Quote 0
          • First post
            Last post