enum { SomeProperty
= QTextFormat::UserProperty + 248 };
enum { SomeProperty = QTextFormat::UserProperty + 248 };
To copy to clipboard, switch view to plain text mode
This creates an enum type with single value named
SomeProperty
SomeProperty
To copy to clipboard, switch view to plain text mode
. You can assign whatever (integer) values you like to enum values.
QTextFormat::UserProperty
To copy to clipboard, switch view to plain text mode
is another enum value defined in QTextFormat namespace. It has an integer value, so you can use it as a number in arithmetic expression.
The code above is roughly the same as
class MyClass;
static const int SomeProperty
= QTextFormat::UserProperty + 248;
...
}
class MyClass;
static const int SomeProperty = QTextFormat::UserProperty + 248;
...
}
To copy to clipboard, switch view to plain text mode
This
MySpace::SomePropery
MySpace::SomePropery
To copy to clipboard, switch view to plain text mode
is how you can access the value of the enum. `ClassName` followed by double colon is a way to access the static member of a class.
Bookmarks