Is there a way to change QTableWidget drop animation? Actually the animation is this: http://imgur.com/a/FGvIe

I tried this, but doesn't work:

Qt Code:
  1. class NewStyle : public QProxyStyle
  2. {
  3. public:
  4. NewStyle(QStyle *baseStyle = 0) : QProxyStyle(baseStyle)
  5. {
  6. }
  7.  
  8. void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
  9. QPainter *painter, const QWidget *widget) const
  10. {
  11.  
  12. if (element == QStyle::PE_IndicatorItemViewItemDrop && !option->rect.isNull()){
  13. QStyleOption opt(*option);
  14. opt.rect.setLeft(0);
  15. if (widget) opt.rect.setRight(widget->width());
  16. QProxyStyle::drawPrimitive(element, &opt, painter, widget);
  17. return;
  18. }
  19. else
  20. {
  21. // the default style is applied
  22. QProxyStyle::drawPrimitive(element, option, painter, widget);
  23. }
  24. }
  25.  
  26. };
To copy to clipboard, switch view to plain text mode