Re: GTKmm beginner
- From: kovariadam <kovariadam gmail com>
- To: gtkmm-list gnome org
- Subject: Re: GTKmm beginner
- Date: Sat, 21 Feb 2009 03:50:56 -0800 (PST)
This solution brings another error.
std::list<QueryTab *> m_Tabs;
QueryTab *d_tab = new QueryTab();
for(std::list<QueryTab *>::iterator i_Tabs = m_Tabs.begin(); i_Tabs !=
m_Tabs.end(); i_Tabs++)
{
m_Tabs.push_back(*i_Tabs);
m_Notebook.append_page(*i_Tabs);
}
Error 1 error C2664: 'int Gtk::Notebook::append_page(Gtk::Widget &)' :
cannot convert parameter 1 from 'QueryTab *' to 'Gtk::Widget &'
d:\documents\visual studio 2008\projects\db2client\db2client\mainwindow.cpp
21 db2client
How am i supposed to add d_tab to m_Notebook?
Paul Davis wrote:
>
> This is going to lead to disaster. You should not be putting instances of
> Gtk::HBox or any derived widgets into an STL container, only pointers to
> them. Widgets are not copyable in the way that many other kinds of objects
> are. Adding copy constructors will make the semantics of your code very
> hard
> to follow, and will likely lead to crashes and odd behaviour.
>
--
View this message in context: http://www.nabble.com/GTKmm-beginner-tp22120395p22135274.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]