jeanremi
28th May 2011, 13:22
Hi
I'm trying to move the splitter handle to its left with the following code, but it's not moving:
QSplitter::setHandleWidth(1);
QSplitterHandle* psh1 = QSplitter::handle(1);
QRect qr = psh1->geometry();
psh1->move(qr.x()-60, qr.y());
Is it even possible? (See attached picture)
Jean
6489
I solved it with:
QList<int> sizes;
sizes.append(desired_left_width);
sizes.append(parentwidth - desired_left_width);
QSplitter::setSizes(sizes);
I'm trying to move the splitter handle to its left with the following code, but it's not moving:
QSplitter::setHandleWidth(1);
QSplitterHandle* psh1 = QSplitter::handle(1);
QRect qr = psh1->geometry();
psh1->move(qr.x()-60, qr.y());
Is it even possible? (See attached picture)
Jean
6489
I solved it with:
QList<int> sizes;
sizes.append(desired_left_width);
sizes.append(parentwidth - desired_left_width);
QSplitter::setSizes(sizes);