Quote Originally Posted by wagmare View Post
thanks .. so i have to send QColor instead of QPen ...
If you want to sent a QColor why you define a constructor expecting a QPen? What's about defining:

Qt Code:
  1. ...
  2. LineItem(const QLineF &rect, const QPen &pen);
  3. LineItem(const QLineF &rect, const QColor &color);
  4. LineItem(const QLineF &rect, const Qt::GlobalColor color);
To copy to clipboard, switch view to plain text mode 

with for example:

Qt Code:
  1. LineItem(const QLineF &rect, const Qt::GlobalColor color)
  2. {
  3. pen = QPen(QColor(color));
  4. }
To copy to clipboard, switch view to plain text mode 

then you will be save.