therealjag
18th February 2006, 19:16
hello there i have tried making a modfied verson of the tooltips example in the documentation. i want to add the widget to a tab(another application) that i have implemented but im not sure about how to add it...
ive tried using the following code but it doesnt seem to work...do i have to make any amendments to the tooltips files i.e. with sortingBox.cpp?? any tips would be really helpful, thanks. Jag
CreatorTab::CreatorTab(const QFileInfo &fileInfo, QWidget *parent)
: QWidget(parent)
{
1. sortingBox = new SortingBox;
2. QHBoxLayout *mainLayout = new QHBoxLayout;
3. mainLayout->addWidget(sortingBox);
4. mainLayout->addStretch(1);
5. setLayout(mainLayout);
}
ive tried using the following code but it doesnt seem to work...do i have to make any amendments to the tooltips files i.e. with sortingBox.cpp?? any tips would be really helpful, thanks. Jag
CreatorTab::CreatorTab(const QFileInfo &fileInfo, QWidget *parent)
: QWidget(parent)
{
1. sortingBox = new SortingBox;
2. QHBoxLayout *mainLayout = new QHBoxLayout;
3. mainLayout->addWidget(sortingBox);
4. mainLayout->addStretch(1);
5. setLayout(mainLayout);
}