Results 1 to 19 of 19

Thread: Text box and list box connectivity

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Post Text box and list box connectivity

    hi,
    i'm beginner to Qt.. there is a text box and list box,when u enter some characters in the text box and give enter to a push button,it should add all the characters to listbox.. so i had written code 4 tat,everything works fine,but adding characters to listbox is not wrkg fine.. the code for adding characters is given below,
    pls check wats wrong with code
    Qt Code:
    1. void show()
    2. {
    3. QTextStream str,str2;
    4. str=text1.text();
    5. str1=length(str);
    6.  
    7. for(int i=0;i<str1;i++)
    8. {
    9.  
    10. str2=insertText(list1.at(i));
    11. i++;
    12. }
    13. display->setText(display->text()+str2);
    14. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 25th July 2006 at 09:38. Reason: Added [code] tags

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
  •  
Qt is a trademark of The Qt Company.