Results 1 to 3 of 3

Thread: Qt Examples: PortedCanvas

  1. #1
    Join Date
    Oct 2011
    Posts
    2
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Qt Examples: PortedCanvas

    Hello, I am looking at the example of Qt: PortedCanvas (Qt 4.7.4).
    In that example you can insert mesh.
    I cannot understand why when I move the node with my mouse, the code

    Qt Code:
    1. QVariant NodeItem::itemChange(GraphicsItemChange change, const QVariant &value)
    To copy to clipboard, switch view to plain text mode 

    is never called. As I can see from the code, it should ensure that also lines connected to the node should move (every NodeItem has its container of out-lines and in-lines).

    Is there some issue in the example? Does anybody has the same experience with the given example?

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

    Default Re: Qt Examples: PortedCanvas

    It's an old example and Qt has come a long way since it was written. In current versions of Qt itemChange() is not called for every change in the item, for those you need to explicitly register using QGraphicsItem::setFlag() passing in QGraphicsItem::ItemSendsGeometryChanges or QGraphicsItem::ItemSendsScenePositionChanges (depending on the effect you want to achieve).
    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.


  3. #3
    Join Date
    Oct 2011
    Posts
    2
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Qt Examples: PortedCanvas

    Thank you. Now it works.

Similar Threads

  1. Qwt examples
    By nitriles in forum Qwt
    Replies: 7
    Last Post: 6th August 2011, 04:07
  2. examples and Ssl
    By szarek in forum Newbie
    Replies: 13
    Last Post: 21st July 2010, 22:33
  3. Qwt examples
    By 31512 in forum Qwt
    Replies: 11
    Last Post: 3rd July 2008, 05:00
  4. Examples on QTOPIA
    By vmd.esys in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st April 2008, 12:59
  5. Qt 3.x Examples
    By ball in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 13:44

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.