Fixed small bug in code snippet for QGraphicsItem

If the enumeration "Type" isn't declared in the public scope, it will
cause an issue upon compilation.  Previously, it was ambiguous on which
access level this should be in.  Snippet [18] though has the enumeration
in the correct access level.

Change-Id: If699df80def3e1b09d8d82df74c4ca85eba003d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Benjamin Summerton 2014-12-09 23:17:19 -05:00
parent 30fdd71b63
commit 7d2357b0a8

View File

@ -61,7 +61,7 @@ public:
//! [1]
class CustomItem : public QGraphicsItem
{
...
public:
enum { Type = UserType + 1 };
int type() const