Skip to content

Instantly share code, notes, and snippets.

@Riateche
Created January 29, 2013 20:57
Show Gist options
  • Save Riateche/4667795 to your computer and use it in GitHub Desktop.
Save Riateche/4667795 to your computer and use it in GitHub Desktop.
template<class T>
void create(const QString& type_name, qint64 width, qint64 height, qint64 depth) {
QVariant(T); // test if T can be converted to QVariant
_array = _project->create_block<Variant_3d_array>(_project->next_block_id());
_array->create<T>(type_name, width, height, depth);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment