salmanmanekia
2nd June 2010, 01:14
Hi all,
I am working on a project and using QGraphicsScene class and QGraphicsProxyWidget class in it ...
I am facing a very basic problem in the implementation of these classes and cant figure out whats the problem..below is the description of the problem..
#include "InputItems.h"
class Scene : public QGraphicsScene
{
,,
InputItems *inItem;
QGraphicsProxyWidget *proxy;
};
#include "scene.h"
Scene::Scene()
{
inItem = new InputItems();
proxy = addWidget(inItem);
}
class InputItems : public QWidget
{
..
private:
QLabel *numberLabel;
..
};
InputItems::InputItems()
{
numberLabel = new QLabel("Telephone number");
}
After running this piece of code i am expecting a QLabel in my widget !!..But there is nothing displayed...Any Ideas..??,..Thanks
I am working on a project and using QGraphicsScene class and QGraphicsProxyWidget class in it ...
I am facing a very basic problem in the implementation of these classes and cant figure out whats the problem..below is the description of the problem..
#include "InputItems.h"
class Scene : public QGraphicsScene
{
,,
InputItems *inItem;
QGraphicsProxyWidget *proxy;
};
#include "scene.h"
Scene::Scene()
{
inItem = new InputItems();
proxy = addWidget(inItem);
}
class InputItems : public QWidget
{
..
private:
QLabel *numberLabel;
..
};
InputItems::InputItems()
{
numberLabel = new QLabel("Telephone number");
}
After running this piece of code i am expecting a QLabel in my widget !!..But there is nothing displayed...Any Ideas..??,..Thanks