Hi everyone, I don't know is it bug or not. I'm developing my custom widget and want to have *style-aware fook&feel*. I'm trying to draw my item areas using drawPrimitive(PE_PanelItemViewItem ...).
It works fine under Linux (Ubuntu) but failed under Windows [8.1]. After some investigation I discovered that QWindowsVistaStyle::drawPrimitive function for PE_PanelItemViewItem element requires widget inherited from QAbstractItemView. I thought QStyleOption and derived classed was introduced to encapsulate all information needed for QStyle class. QWinget parameter for QStyle functions declared in Qt documentation as optional. But QWindowsVistaStyle::drawPrimitive(PE_PanelItemViewItem totaly breaks these conventions and cannot be used for custom widgets (not derived from QAbstractItemView). If you dig into the QWindowsVistaStyle::drawPrimitive code you will see a little tune-up code (a few lines) dependent from QAbstractItemView widget ( https://qt.gitorious.org/qt/qt/source/57756e72adf2081137b97f0e689dd16c770d10b1:src/gui/styles/qwindowsvistastyle.cpp#L731). All other code is general. I think we should limit QAbstractItemView's check for these few lines only. -- Best regards, Alex
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
