Results 1 to 5 of 5

Thread: combine QLisdt and a simple structure

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Posts
    92
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default combine QLisdt and a simple structure

    Most posts on this subject go way beyond what I want, and I quickly loose track.

    I have a structure
    Qt Code:
    1. typedef structure LDD_POINT{
    2. int row;
    3. int col;
    4. }LDD_POINT;
    To copy to clipboard, switch view to plain text mode 

    in my class I define:

    Qt Code:
    1. QList <LDD_POINT> *lddlist;
    To copy to clipboard, switch view to plain text mode 

    then with each new point in the code:

    Qt Code:
    1. ldd_point *p = new LDD_POINT;
    2. lddlist->append(p);
    To copy to clipboard, switch view to plain text mode 

    which doesn't work:
    c:\Qt\2010.05\qt\include\QtCore\..\..\src\corelib\ tools\qlist.h:493: candidates are: void QList<T>::append(const T&) [with T = LDD_POINT]
    c:\Qt\2010.05\qt\include\QtCore\..\..\src\corelib\ tools\qlist.h:819: void QList<T>::append(const QList<T>&) [with T = LDD_POINT]

    So obviously I am doing something too simple. I don't understand the const T stuff, what is the correct format, or point me to an example...

    Thanks
    Last edited by wysota; 25th January 2011 at 00:47. Reason: missing [code] tags

Similar Threads

  1. Replies: 4
    Last Post: 5th September 2010, 10:08
  2. Qt Assistant how to combine QtAssistant with Eclipse?
    By silence in forum Qt Tools
    Replies: 1
    Last Post: 14th April 2010, 12:25
  3. Howto combine a slider and a progress bar?
    By Cruz in forum Qt Programming
    Replies: 3
    Last Post: 21st March 2010, 12:09
  4. how to combine keypress event and mousebuttonpress event?
    By hildebrand in forum Qt Programming
    Replies: 2
    Last Post: 26th May 2009, 23:08
  5. Combine C++ Qt with PyQT
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2009, 16:14

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.