title: wxDataViewListCtrl and wxVariant
body: <p>I have a simple setup, a wxDataViewListCtrl, the first column uses wxDataViewCustomRenderer and the second column is just text.</p>
  
  <pre><code>class MyCustomRenderer : public wxDataViewCustomRenderer
  </code></pre>
  
  <p>I add a line to the wxDataViewListCtrl like this:</p>
  
  <pre><code>wxVector&lt;wxVariant&gt; item;
  item.push_back(wxVariant(/*a raw pointer of MyClass goes here*/));
  item.push_back(wxVariant("some string goes here"));
  m_data_view_list_ctrl-&gt;AppendItem(item);
  item.clear();
  </code></pre>
  
  <p>And this is MyClass:</p>
  
  <pre><code>class MyClass final : public wxObject
  </code></pre>
  
  <p>And this is how my SetValue method looks like:</p>
  
  <pre><code>bool MyCustomRenderer::SetValue(const wxVariant&amp; value)
  {
      MyClass* temp = static_cast&lt;MyClass*&gt;(value.GetWxObjectPtr());
  
      /*Do stuff with temp here...*/
  
      return true;
  }
  </code></pre>
  
  <p>It worked, now it does not. It fails with the following error:
  <a href="https://www.dropbox.com/s/acxbzthp3ltadny/wxwidgets.png?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/acxbzthp3ltadny/wxwidgets.png?dl=0</a></p>
  
  <p>The only thing I changed is that I updated my static libs of wxWidgets from 3.0.4 to 3.1.2.
  Why has it stopped working? What am I missing here?
  Please help me :-)</p>
  
  <h1>Update</h1>
  
  <p>Thank you all for answering. The problem was solved <a href="https://forums.wxwidgets.org/viewtopic.php?f=1&amp;t=45538" rel="nofollow noreferrer">here</a>. In short I needed to change this line like this:</p>
  
  <pre><code>MyCustomRenderer::MyCustomRenderer() : wxDataViewCustomRenderer("void*", wxDATAVIEW_CELL_INERT, wxALIGN_CENTER)
  </code></pre>
  
  <p>And this one like this:</p>
  
  <pre><code>item.push_back(wxVariant(static_cast&lt;void*&gt;(/*Raw pointer to an instance of MyClass*/)));
  </code></pre>