a qml problem



  • 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.



  • @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.



  • 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**".


Log in to reply
 

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