Results 1 to 2 of 2

Thread: Listbox widget

  1. #1
    Join Date
    Jul 2008
    Posts
    6
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Listbox widget

    hi all;
    how can i store d listbox items in an array...is there any indexing of items in list box...??
    i m using Qt 3 on linux...

    thanks...

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Listbox widget

    Qt Code:
    1. QStringList itemList;
    2.  
    3. for(int i = 0; i < listBox.count(); i++)
    4. {
    5. itemList<<listBox.text(i);
    6. }
    To copy to clipboard, switch view to plain text mode 

    Index starts from 0.

  3. The following user says thank you to munna for this useful post:

    awanish_jmi (25th July 2008)

Similar Threads

  1. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06
  4. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.