[Qt-interest] mousePress Eveent disabling QTreeWidgetItem and childIndicator

Sujan Dasmahapatra sdh at lmwindpower.com
Tue Mar 22 06:02:49 CET 2011


Dear Friends

I have just implemented  drag and drop for  QTreeWidgetItems. But as I
reimplemented mousePressEvent() then I am not able to select an item and
childIndicator is not expanding. The item is disabled from mouseAction.
I implemented drag and drop for right mouse button.

 

////////////////////////////////////////////////////////////////////////
///////////////////////////////////

void Tree::mousePressEvent(QMouseEvent *event)

{

 

       if(event->button()==Qt::RightButton)

       {

       draggingItem = this->itemAt(event->pos());

       QDrag *drag = new QDrag(this);

       drag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction);

       event->accept();

       }

}

////////////////////////////////////////////////////////////////////////
///////////////////////////

 

Thanks in advance for any help.

 

Kind Regards,

 

 

Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group

Tel    +91 80 66470248
Mob  

sdh at lmwindpower.com <mailto:%25EMAIL%25> 

 

LM Wind Power Blades

lmwindpower.com

 

Together we capture the wind to power a cleaner world

________________________________

 

This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110322/75a1da4b/attachment.html 


More information about the Qt-interest-old mailing list