3#include <QStandardItem>
4#include <QtCore/qmimedata.h>
5#include <QtGui/qdrag.h>
6#include <QtOpenGLWidgets/qopenglwidget.h>
7#include <QtPrintSupport/qprintdialog.h>
8#include <QtPrintSupport/qprinter.h>
9#include <QtWidgets/QGraphicsSceneMouseEvent>
10#include <QtWidgets/qdialog.h>
11#include <QtWidgets/qgraphicsview.h>
int type() const override
Returns the type of an item as an int.
void mousePressEvent(QGraphicsSceneMouseEvent *event)
[5]
QStandardItem * clone() const override
Returns a copy of this item.
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
void setMimeData(QMimeData *data)
Sets the data to be sent to the given MIME data.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
QGraphicsRectItem * addRect(const QRectF &rect, const QPen &pen=QPen(), const QBrush &brush=QBrush())
Creates and adds a rectangle item to the scene, and returns the item pointer.
void render(QPainter *painter, const QRectF &target=QRectF(), const QRectF &source=QRectF(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
Renders the source rect from scene into target, using painter.
QGraphicsItem * itemAt(const QPointF &pos, const QTransform &deviceTransform) const
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
The QPainter class performs low-level painting on widgets and other paint devices.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
The QPrintDialog class provides a dialog for specifying the printer's configuration.
\inmodule QtCore\reentrant
The QStandardItem class provides an item for use with the QStandardItemModel class.
QStandardItem()
Constructs an item.
void show()
Shows the window.
void snippetThatUsesMyPopulateScene()
void graphicsview_snippet_main()
void myPopulateScene(QGraphicsScene *)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format