Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 21 Nov 2012
Offline Last Active Dec 18 2014 03:01 AM

Posts I've Made

In Topic: Access violation: QTreeWidgetItem

01 September 2014 - 03:33 PM

Usually I've used QTreeWidgetItemIterator like this without any problems: 

QTreeWidgetItemIterator it(treeWidget);

Are you deleting them items somewhere in your code? Remember that QTreeWidgetItems are not QObjects and one must safely delete (remember to set to null) them manually. Your hasRoot logic seems a bit odd. QTreeWidget has a default invisible root item (QTreeWidget::invisibleRootItem()) by default to which all top-level items are added.

In Topic: msvc "install" command?

20 May 2014 - 02:54 AM

It's probably possible to achieve something similar by specifying some custom post-build steps, but yeah, choosing CMake over manual sln would be probably recommended, and makes this among many other stuff a lot easier.

In Topic: what happens when std::vector is left empty?

03 May 2014 - 03:29 AM

Typically you want to declare your variables upon the first usage and not beforehand. Also, you don't want to declare an unused variable: this will likely produce a compiler warning and the variable is most likely removed by the compiler optimizations altogether anyways. An empty std::vector will take some bytes of memory, but the exact size depends on the used compiler, STL implementation, and target architecture. F.ex. figures for couple different MSVC implementations can be found here: http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx

In Topic: Modify functions from generic class? (c++)

13 February 2014 - 10:52 AM

Maybe consider using entity-component system for your game engine (i.e. composition, mentioned by BitMaster).

In Topic: Problem with C++ and visual studio 2010

12 September 2013 - 03:47 AM

Edit: slow pony is slow.