Results 1 to 6 of 6

Thread: A QWidgetList passed to a function does not offer the QWidgetList methods

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default A QWidgetList passed to a function does not offer the QWidgetList methods

    I have
    Qt Code:
    1. void A_table::w_inform(QWidgetList *lista);
    To copy to clipboard, switch view to plain text mode 
    I write lista->additem("hello");

    And compiler tells me that QWidgetList has no member 'additem' ?????
    Moreover, the combo does not offer me the methods for a QWidgetList ????
    (It happens that it is as I pass A QList ???)
    Any idea ?

    Solved: it is QListWidget not QWidgetList .......
    Please delete this post ....... and excuse me
    Last edited by tonnot; 19th April 2011 at 12:02.

  2. #2
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A QWidgetList passed to a function does not offer the QWidgetList methods

    I can't understand why would u like to do that? I mean *lista is a parameter that u will use in some way, but why would u change it? U should change something that u create in your function.
    But I may be wrong...

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: A QWidgetList passed to a function does not offer the QWidgetList methods

    QWidgetList is a tydef for QList<QWidget*>

    Is not a QListWidget.

    So in the lista you can add pointers to some QWidgets, not QStrings that get converted to items.

  4. #4
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A QWidgetList passed to a function does not offer the QWidgetList methods

    XD just figured the same thing

  5. #5
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: A QWidgetList passed to a function does not offer the QWidgetList methods

    Is it possible to delete or close posts ???

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: A QWidgetList passed to a function does not offer the QWidgetList methods

    Quote Originally Posted by tonnot View Post
    Is it possible to delete or close posts ???
    No, you have to bear your shame
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 1st March 2011, 21:01
  2. Replies: 4
    Last Post: 20th January 2011, 01:03
  3. Replies: 0
    Last Post: 24th October 2010, 19:09
  4. extern QWidgetList *qt_modal_stack
    By Alex_123 in forum Qt Programming
    Replies: 5
    Last Post: 20th December 2008, 12:24
  5. QWidgetList
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2007, 07:53

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.