gimel
26th November 2008, 08:48
I am trying to extend the Qt example FlowLayout to include the insertWidgetAt(int position, QWidget* w) method.
I wrote (borrowed the code from QBoxLayout):
//public:
void FlowLayout::insertWidgetAt(int pos,QWidget *w){
addChildWidget(w);
insertItem(pos,QLayoutPrivate::createWidgetItem(th is, w)); //***
invalidate();
}
//private:
void FlowLayout::insertItem(int pos,QLayoutItem *item){
itemList.insert(pos,item);
}
At the line marked with //***, gcc gives "incomplete type `QLayoutPrivate' used in nested name specifier" error. What should I do to implement the method?
I wrote (borrowed the code from QBoxLayout):
//public:
void FlowLayout::insertWidgetAt(int pos,QWidget *w){
addChildWidget(w);
insertItem(pos,QLayoutPrivate::createWidgetItem(th is, w)); //***
invalidate();
}
//private:
void FlowLayout::insertItem(int pos,QLayoutItem *item){
itemList.insert(pos,item);
}
At the line marked with //***, gcc gives "incomplete type `QLayoutPrivate' used in nested name specifier" error. What should I do to implement the method?