Results 1 to 1 of 1

Thread: How to append the text from the buttons into Textfield in qt qml?

  1. #1
    Join Date
    Nov 2011
    Posts
    45
    Qt products
    Qt4
    Platforms
    Symbian S60

    Post How to append the text from the buttons into Textfield in qt qml?

    Hi all,
    I am trying to display the text inside a button in a Textfield using Qt Qml.

    I am having a button with a text "Apple" and a Textfield which is blank.

    I had tried and displayed the text in the textfield using this code:


    Button {
    id: button13
    x: 76
    y: 447
    text: "Apple"
    onClicked: {

    t.visible = text
    }


    TextField {
    id: t
    x:76
    y:129
    width: 230
    height: 50
    text: ""

    }
    Now what i am trying for is:

    I am having two buttons with different text inside it.

    For example:in 1st button "Apple" and in 2nd button "Banana" i need to display the text inside the two buttons in the text field.....

    Which means i need to display AppleBanana in the textfield...


    I mean:How to append those two values into the text field?

    Anyone come with the answer????

    Thanks in advance,
    Harish
    Last edited by harish; 24th January 2012 at 06:40.

Similar Threads

  1. Changing text of button in no relation to button
    By Sabre Runner in forum Newbie
    Replies: 22
    Last Post: 23rd September 2010, 12:29
  2. Replies: 6
    Last Post: 21st August 2010, 21:09
  3. who know about making button with text and image
    By erichong81 in forum Qt Programming
    Replies: 1
    Last Post: 17th March 2010, 06:19
  4. Button icon and text
    By electronicboy in forum Qt Programming
    Replies: 5
    Last Post: 9th October 2009, 22:27
  5. Button Text Position
    By Slewman in forum Qt Tools
    Replies: 1
    Last Post: 29th September 2009, 16:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.