42 #ifndef QT_NO_QCOLUMNVIEW 103 int oldWidth = parentWidget->
width();
104 int newWidth = oldWidth;
113 int realOffset = parentWidget->
width() - oldWidth;
114 int oldX = parentWidget->
x();
118 realOffset = -1 * (oldX - parentWidget->
x());
156 d->originalXLocation =
event->globalX();
167 int offset =
event->globalX() -
d->originalXLocation;
168 d->originalXLocation =
moveGrip(offset) +
d->originalXLocation;
179 d->originalXLocation = -1;
188 originalXLocation(-1)
194 #endif // QT_NO_QCOLUMNVIEW The QPainter class performs low-level painting on widgets and other paint devices.
#define QT_END_NAMESPACE
This macro expands to.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void mouseMoveEvent(QMouseEvent *event)
Reimplemented Function Calculate the movement of the grip and moveGrip() and emit gripMoved ...
void mouseDoubleClickEvent(QMouseEvent *event)
Reimplemented Function Resize the parent window to the sizeHint
int width() const
Returns the width.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void paintEvent(QPaintEvent *event)
Reimplemented Function
The QStyleOption class stores the parameters used by QStyle functions.
void initFrom(const QWidget *w)
QColumnViewGrip(QWidget *parent=0)
Creates a new QColumnViewGrip with the given parent to view a model.
int moveGrip(int offset)
Attempt to resize the parent object by offset returns the amount of offset that it was actually able ...
The QMouseEvent class contains parameters that describe a mouse event.
~QColumnViewGrip()
Destroys the view.
void mouseReleaseEvent(QMouseEvent *event)
Reimplemented Function Stop watching for mouse movements
QObject * parent() const
Returns a pointer to the parent object.
virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0
Draws the given element with the provided painter with the style options specified by option...
void mousePressEvent(QMouseEvent *event)
Reimplemented Function Begin watching for mouse movements
The QPaintEvent class contains event parameters for paint events.
void gripMoved(int offset)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...