I want to make something like a hud. I have a QGraphicsScene
with a huge QPixmap
, that I added to a much smaller QGraphicsView
. Now I need to add some control elements, like QLabel
, QPushButton
and QGraphicsEllipseItem
. That's, I think, is not a problem. I found this helpful page Graphics View Classes. But how do I anchor this control elements to the View or maybe better said how do I not anchor them? When I drag the QPixmap
, then I don't want that the hud is moving with the QPixmap
out of the QGraphicsView
.
What do I need to do, to solve this problem. Hope someone can help me.
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- How to set the font size of the label on pushbutto
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
You should just have to create your widgets and specify the
QGraphicsView
in the constructor like this: