# QPen Class Reference

### [com.trolltech.qt.gui package]

### Constructor

- void QPen()
- void QPen(PenStyle arg__1)
- void QPen(QBrush brush, qreal width, PenStyle s, PenCapStyle c, PenJoinStyle j)
- void QPen(QColor color)
- void QPen(QPen pen)

### Constructor Properties

- prototype: The QPen prototype object

### Prototype Object Properties

- QBrush brush()
- PenCapStyle capStyle()
- QColor color()
- qreal dashOffset()
- List dashPattern()
- bool isCosmetic()
- bool isSolid()
- PenJoinStyle joinStyle()
- qreal miterLimit()
- bool operator_equal(QPen p)
- void readFrom(QDataStream arg__1)
- void setBrush(QBrush brush)
- void setCapStyle(PenCapStyle pcs)
- void setColor(QColor color)
- void setCosmetic(bool cosmetic)
- void setDashOffset(qreal doffset)
- void setDashPattern(List pattern)
- void setJoinStyle(PenJoinStyle pcs)
- void setMiterLimit(qreal limit)
- void setStyle(PenStyle arg__1)
- void setWidth(int width)
- void setWidthF(qreal width)
- PenStyle style()
- void swap(QPen other)
- int width()
- qreal widthF()
- void writeTo(QDataStream arg__1)

### Instance Properties

QPen objects have no special properties beyond those inherited from the QPen prototype object.