zorro68
23rd February 2008, 00:52
I have made a class like this:
class Listbox : public QWidget
{
Q_OBJECT
public:
Listbox(int width, QWidget *parent = 0);
......
and then in other class I define this:
QVector<Listbox> *listbox;
...
listbox = new QVector<Listbox>();
And I try to append items to my vector like this:
listbox.append(Listbox);
But I can't. I get errors.
How can I append items to my empty qvector of Listboxes????:confused:
class Listbox : public QWidget
{
Q_OBJECT
public:
Listbox(int width, QWidget *parent = 0);
......
and then in other class I define this:
QVector<Listbox> *listbox;
...
listbox = new QVector<Listbox>();
And I try to append items to my vector like this:
listbox.append(Listbox);
But I can't. I get errors.
How can I append items to my empty qvector of Listboxes????:confused: