Skip to content

Instantly share code, notes, and snippets.

View aionoid's full-sized avatar
💭
...

Farouk Brown aionoid

💭
...
View GitHub Profile
@aionoid
aionoid / PropertyHelper.h
Created April 13, 2016 09:11 — forked from Rolias/PropertyHelper.h
Qt Auto Property Macros
#pragma once
#include <QObject>
//See Gist Comment for description, usage, warnings and license information
#define AUTO_PROPERTY(TYPE, NAME) \
Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME ## Changed ) \
public: \
TYPE NAME() const { return a_ ## NAME ; } \
void NAME(TYPE value) { \
if (a_ ## NAME == value) return; \
a_ ## NAME = value; \
# If there is no version tag in git this one will be used
VERSION = 0.1.0
# Need to discard STDERR so get path to NULL device
win32 {
NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL
} else {
NULL_DEVICE = /dev/null
}