Qt 4.6.2 : set the parent of a QScrollBox

J

Jens Kallup

Hello,

the function below is a wrapper function that is called in an assembler
module.
The problem is, how to define the "parent" of "n".
can you help me please to make it possible nested panels...

TPanel is type of QScrollArea.
thanks a lot
Jens

here the code:

extern "C" EXPORT void set__position(int w, int t, int n, int p, int
parent, int wert)
{
....
else if (t == 8) { // container/panel

cout << "panel" << endl;

if (kawin[w]->panel[n] == NULL)
{
kawin[w]->panel[parent] = new TPanel(kawin[w]);
kawin[w]->panel[n] = kawin[w]->panel[parent];
}

if (p == 0) { kawin[w]->panel[n]->Top = wert; } else
if (p == 1) { kawin[w]->panel[n]->Left = wert; } else
if (p == 2) { kawin[w]->panel[n]->Width = wert; } else
if (p == 3) { kawin[w]->panel[n]->Height = wert; }

kawin[w]->panel[n]->setGeometry(
kawin[w]->panel[n]->Left,
kawin[w]->panel[n]->Top,
kawin[w]->panel[n]->Width,
kawin[w]->panel[n]->Height);

//kawin[w]->panel[n]->setParent(kawin[w]->panel[parent]);
kawin[w]->panel[n]->show();
//kawin[w]->panel[n]->show();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top