Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
PyQt5:我无法理解 QGraphicsScene 的 setSceneRect(x, y, w, h)
我看到有人说如果你想把QGraphicsScene的坐标原点放在QGraphicsView的原点 即左上角 您需要让它们具有相同的大小 所以这就是我所做的 import sys from PyQt5 QtWidgets import QAp
python
pyqt
PyQt5
QgraphicsScene
QGraphicsPixmapItem 不可选
我想要我的QGraphicsPixmapItem变得可选择 即以更一般的方式可点击 QGraphicScene但事实并非如此 我其实是在修改Qt s 图表场景示例 http doc qt nokia com 4 7 snapshot gra
c
QT
QT4
QGraphicsItem
QgraphicsScene
QGraphicsScene 选择更改后为所选项目切换 QPen
如何切换所选图形视图项目的 QPen 颜色 理想情况下 我想在图形视图或图形场景对象中处理这种颜色变化 而不是直接在主窗口选择事件中处理它 任何帮助表示赞赏 目前 当选择对象时 它会将笔颜色变为白色 我不知道如何将其转回以避免循环遍历所有对
python
Selection
pyside
QGraphicsView
QgraphicsScene
QT QGraphics场景绘制圆弧
我有一个关于在场景上绘制特定弧线的问题 我有关于弧的信息 起始坐标 起始角度 结束角 半径 但我无法有效地使用它们QPainter 其实我尝试过QPainterPath使用形状来显示QGraphicsScene with addPath 但
c
QT
QgraphicsScene
QPainter
在QGraphicsView的ScrollHandDrag模式下,如何停止场景中QGraphicsItems的移动?
我有多个QGraphicsItem场景中的内容分布在场景的不同部分 在应用程序中 有不同的模式 其中一种模式用户可以滚动场景 手掌拖动模式 为了实现场景I的滚动set dragMode of QGraphicsView to ScrollH
QT
QT4
QGraphicsView
QGraphicsItem
QgraphicsScene
如何在 QGraphicsScene 上绘制一个点(通过鼠标单击)?
我有以下代码来设置QGraphicsScene 我希望单击场景并在我单击的位置绘制一个点 我怎么能这样做呢 这是我当前的代码 MainWindow MainWindow QWidget parent QMainWindow parent u
c
QT
QgraphicsScene
mouseclickevent
我不明白为什么我得到 QPainter::begin: Widget Painting can only begin as a result of apaintEvent
我一直在查看有关此错误的其他 StackOverflow 问题 以及网络上的其他地方 但我不明白这些答案与我的代码有何关系 因此 我希望有一个对我有意义的固定示例 或者更好地解释事件如何以及何时发生 下面的代码旨在计算出其运行的屏幕尺寸 调
python
pyqt
pyside
QGraphicsView
QgraphicsScene
如何设置QGraphicsScene/View到特定的坐标系
我想在a中绘制多边形QGraphicsScene但多边形具有纬度 经度位置 在等距柱状投影中 坐标来自 90 180 gt 180 90 我怎样才能设置QGraphicsScene QGraphicsView这样的预测 非常感谢 Carlo
QT
PROJECTION
QGraphicsView
QgraphicsScene
PyQt:QGraphicsView中的鼠标事件
我想用 PyQt 用 Python 编写一个简单的程序 我有一个 QGraphicsScene 我想执行以下操作 使用两个单选按钮有 2 个选项 用于生成点 这样 如果有人单击场景 就会出现一个椭圆 用于选择点 这样 如果有人单击某个点 将
python
pyqt
PyQt5
QGraphicsView
QgraphicsScene
Qt 中的多色工具提示
我想要 QGraphicsItems 的可移动多色工具提示 例如 当我单击场景中的图形项目时 会出现工具提示 然后在拖动鼠标期间工具提示应跟随光标 我可以使用标准 QToolTip 实现可移动工具提示 但 Qt 似乎只支持整个工具提示的 1
c
QT
tooltip
QgraphicsScene
在 QGraphicsScene 中移动 QGraphicItems 的有效方法
我正在使用 pyqt5 开发视频播放器 我在场景中使用 QGraphicsVideoItem 在此视频项目之上 我还需要一些在每个新帧上围绕场景移动的多边形 他们跟踪视频中的内容 理想情况下我不想让它们以 30 fps 的速度移动 我进行了
python
pyqt
PyQt5
QGraphicsView
QgraphicsScene
PyQt:使用不同的 ItemIgnoresTransformations 标志移动多个项目
有时选定的项目不会一起移动 这种情况发生在具有两种类型项目的应用程序中 常规物品 处理 与ItemIgnoresTransformations标志 缩放时它们必须保持相同的大小 当它们一起被选择并用鼠标移动时 它们预计会被平移相同的量 它们
QT
pyqt
QGraphicsView
QGraphicsItem
QgraphicsScene
QGraphicsView / QGraphicsScene 尺寸匹配
如何制作具有指定大小的 QGraphicsScene 和 QGraphicsView 来监视具有相同大小的场景 这听起来像是一个愚蠢的问题 但请考虑以下测试代码 1 import sys from PyQt4 import QtGui Qt
QT
pyqt
QGraphicsView
QgraphicsScene
根据缩放级别渲染 QGraphicsScene
有没有一种 快速 方法可以根据视图缩放级别仅渲染 GraphicsScene 项目的子集 我有一个包含许多网格线的大场景 当缩放更改以避免 网格完全填充场景 效果时 我想隐藏 显示其中一些网格线 网格线是使用QGraphicsScene的a
QT
zooming
QGraphicsView
QgraphicsScene
Qt:QGraphicsScene 在我期望的时候没有更新
好的 我有一个QGraphicsScene在一个叫做 眼睛 的课程中 我调用一个函数 void eye playSequence int sequenceNum for int i 0 i
c
QT
QgraphicsScene
QGraphicsView fitInView 边距
为什么这个 graphics view gt fitInView scene gt sceneRect Qt KeepAspectRatio 没有按预期工作 它没有正确适合场景矩形 显示其周围的边距 原因是这样的 https bugrepo
c
QT
QGraphicsView
QgraphicsScene
如何在 QQuickPaintedItem 中有效地绘制顺序图像
由于某种原因 我需要将 opencv VideoCapture 包装在一个将在 Qt Quick 中使用的类中 有两个类 一个是Camera 另一个是CameraView CameraView继承自QQuickPaintedItem Cam
QT
QgraphicsScene
qquickitem
将 QGraphicsScene 保存到 Svg 会更改缩放比例
我需要保存我的项目QGraphicsScene到 svg 并能够将该 svg 加载回场景 我能做到 但每次将画布保存到 svg 时 加载时项目都会变大 并且重复保存和加载相同的 svg 会导致其增大 我找不到原因 我附上了示例代码 以及结果
QT
SVG
QgraphicsScene
修复了 QGraphicsItem 的位置,而不改变场景中其他 QGraphicsItem 的行为
这个问题与 强制 QGraphicsItem 保持原状 我想要一个QGraphicsItem在场景中移动时位于固定位置 建议的解决方案是覆盖void paintEvent QPaintEvent 子类的QGraphicsView void
c
QT
QGraphicsView
QGraphicsItem
QgraphicsScene
用鼠标旋转QGraphicsPixmapItem
我正在 PyQt 中编写一个应用程序 允许用户选择 图像放置在QGraphicsScene 使用自定义QGraphicsPixmapItem 选择后我想要一个旋转手柄 出现在用户可以用鼠标 抓取 的图像上 旋转 从而旋转QGraphicsP
QT
Rotation
pyqt
QgraphicsScene
1
2
»