Results 1 to 5 of 5

Thread: documentation issues

  1. #1
    Join Date
    Jul 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default documentation issues

    Hi,

    is it possible that there are some function, in particular in the QGraphicsView framework, that are not documented? For instance, I had to go through the header files to find out that there is a

    Qt Code:
    1. void setPos(const QPointF &pos);
    To copy to clipboard, switch view to plain text mode 

    function in the class QGraphicsSceneMouseEvent.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: documentation issues

    There are function such as your found one that are internal, and so they marked in the cpp file. The purpose is to hide these functions for normal users, since they normal should not use that functions...

  3. #3
    Join Date
    Jul 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: documentation issues

    Then I don't get why it is intended to hide such a useful function.

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: documentation issues

    Go ahead an use it if you want to. When it is removed or renamed or gets a different function signature, thought, don't complain about having to rewrite your code.

    There are many functions in Qt that aren't documented, for many reasons. Quite often, undocumented functions are in a pre-release state and haven't been thoroughly tested, or haven't had their design fully defined.

    It isn't clear why you would ever want to set your own position on a mouse event. Mouse position is normally determined by the mouse (and OS); it isn't something users would normally fiddle with. If you need to modify a position within your own handler, feel free to do so - there are plenty of functions that will tell you where the event took place. If you want to modify the position within the event, that suggests you want to pass the event along to another handler with a (now corrupted) sense of position, which doesn't strike me as a good idea.

  5. #5
    Join Date
    Jul 2010
    Posts
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: documentation issues

    I am working on a QGraphicsItem that is a coordinator of a set of child items. Events should be distributed from and to the coordinator and to other children. Now, the event coordinates are by default in the local coordinate system of the item. Child items should not care about coordinate system conversion, so I don't want to use scenePos() if there are other ways. So in my software, the coordinator perform the transformation of the event's coordinates to his own system and to the child's system. As far as I understood, this is what the scene does to distribute the widget mouse event to the items.

    So I agree it hardly makes sense to modify the coordinates of a normal mouse event (even though there may be applications for that), but I think it does make sense in the context of this graphicsView stuff.

Similar Threads

  1. Documentation Help in vs2005
    By superteny in forum Installation and Deployment
    Replies: 2
    Last Post: 1st July 2009, 09:29
  2. DocuMentation item
    By impeteperry in forum Qt Programming
    Replies: 7
    Last Post: 1st September 2008, 09:08
  3. Generate Qt documentation
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2008, 16:09
  4. Adding Qt's documentation to Xcode documentation browser
    By fabietto in forum Qt Programming
    Replies: 0
    Last Post: 10th June 2007, 15:38
  5. Documentation problem.
    By impeteperry in forum Qt Programming
    Replies: 6
    Last Post: 6th October 2006, 01:06

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.