
Originally Posted by
bunjee
Here is the implementation for a 1 pixel painted + 4 pixels draggable area.
(this code is from QtCreator, licensed in GPL)
Doesn't seem to work on Qt 4.4.3, anyone could confirm this ?
I believe there is a small piece of extra code defined in the manhattanstyle.cpp files
QSize ManhattanStyle
::sizeFromContents(ContentsType type,
const QStyleOption *option,
{
QSize newSize
= d
->style
->sizeFromContents
(type, option, size, widget
);
if (type == CT_Splitter && widget && widget->property("minisplitter").toBool())
else if (type == CT_ComboBox && panelWidget(widget))
return newSize;
}
QSize ManhattanStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
const QSize &size, const QWidget *widget) const
{
QSize newSize = d->style->sizeFromContents(type, option, size, widget);
if (type == CT_Splitter && widget && widget->property("minisplitter").toBool())
return QSize(1, 1);
else if (type == CT_ComboBox && panelWidget(widget))
newSize += QSize(10, 0);
return newSize;
}
To copy to clipboard, switch view to plain text mode
Bookmarks