添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
稳重的皮带  ·  QObject::connect: ...·  1 月前    · 
憨厚的香烟  ·  QObject::connect: ...·  1 月前    · 
阳刚的熊猫  ·  Remove a ...·  9 月前    · 
愤怒的显示器  ·  QList, duplicate problem·  9 月前    · 
魁梧的伤疤  ·  配備 aptX HD 的 Creative ...·  1 月前    · 
坚强的铁板烧  ·  SQL UNION overview, ...·  5 月前    · 
月球上的钢笔  ·  平台和工具·  7 月前    · 
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Welcome to Qt Centre .

Qt Centre is a community site devoted to programming in C++ using the Qt framework . Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today !

If you have any problems with the registration process or your account login, please contact us .

QList<QPointF>
When a user clicks on the middle mouse on a scene, a new item is added to the first list and its position is added to the second list.
I want to be able to remove an item from a scene if the user clicks on the middle mouse on the item on the scene. something like:
if (e->buttons().testFlag(Qt::MidButton))
QGraphicsItem *item;
item = itemAt(e->scenePos());
if (item)
this->Scene->removeItem(item);
/* remove the location of the item from QList<QPointF> */
I was thinking that if I'll have a way to know the location of the item in the QList<QGraphicsItems *>, I'll be able to remove its position from QList<QPointF>.
How can I do this?
Thank you for any solutions.