Results 1 to 11 of 11

Thread: QList QgraphicsItem pos x value returns 0

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Sep 2011
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QList QgraphicsItem pos x value returns 0

    Note* myNote = new Note;
    myNote->setRect(gridX-(w/2), (y-(h/2)), w, h); // w= width, h == height, gridX is a grid-altered x location, y is the location on the staff vertically.

    Also, I stated something wrong earlier. I have a class called Note that is of QObject and QGraphicsEllipseItem. I create a new Note and set that rect using the above line. I hope this is more helpful.
    Last edited by devdon; 19th September 2011 at 22:57.

Similar Threads

  1. Qlist<QLabel *> in Qlist<QAction*>
    By Naahmi in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2011, 08:53
  2. Replies: 4
    Last Post: 20th August 2010, 13:54
  3. Whats wrong with QList<QGraphicsItem>
    By rubenvb in forum Newbie
    Replies: 6
    Last Post: 22nd January 2010, 19:01
  4. Copying an QList into a new, sorted QList.
    By Thomas Wrobel in forum Newbie
    Replies: 3
    Last Post: 11th January 2010, 18:27
  5. QList: Out of memory - without having defined QList
    By miroslav_karpis in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2009, 08:42

Tags for this Thread

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.