×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    two simple doubts

    1. How can i get the index of the selectedItem in a QListWidget.. I dont seem to find any getSelectedIndex() type of method.. Need a integer return value !

    2. Need to download an image from a URL and display it. Whats the simplest way ?

    Thanks.
    Twitter - manikantan_k
    Just in --

  2. #2

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: two simple doubts

    Thanks...
    But I wish to get an integer return value;not a QWidget..
    I am currently using QModelIndex, but its not straightforward..
    Is there a simpler way ?
    Twitter - manikantan_k
    Just in --

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: two simple doubts

    Quote Originally Posted by manikantan View Post
    Thanks...
    But I wish to get an integer return value;not a QWidget..
    I am currently using QModelIndex, but its not straightforward..
    Is there a simpler way ?
    QListWidget is not derived from QWidget and there is QListWidget::indexFromItem to get an index from item. There is no API returning integer since list supports multiple selection.

    About your second question you can use QNetworkAccessManager http://doc.trolltech.com/4.6/qnetwor...r.html#details
    Last edited by divanov; 2010-01-22 at 08:32.

  5. #5
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    430

    Re: two simple doubts

    Use QModelIndex. There is good reason why there is no integer. Use QModelIndex::row if you are only interested in the row number.

  6. #6
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Dublin
    Posts
    240

    Re: two simple doubts

    QModelIndex is interface to know the selected row in list box. QModelIndex::row() will give you selected row. May be you can set slot to list box siganl such as doubleClicked() such as, have a look at http://gitorious.org/gallery/gallery...erListForm.cpp
    Thanks,
    Datha

Similar Threads

  1. Simple http request
    By Christophe.A in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2008-06-11, 16:42
  2. SIMPLE vs XMPP?
    By stellion in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-11-15, 23:15
  3. some doubts regarding receiving faxces for a1000
    By Anjali Ram in forum Symbian
    Replies: 2
    Last Post: 2005-05-06, 06:07
  4. Simple game do NOT imply simple solution...
    By etamburini in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2005-04-04, 15:29
  5. What's going wrong with installation simple midlet (6310i)
    By zgibniew in forum Mobile Java General
    Replies: 3
    Last Post: 2003-09-24, 10:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×