Hi all
How can i select multiple objects by pressing CTRL key along with mouse left button as we do in windows environment.
my configuration:
os : windows xp
qt : 4.7.0
thanks.
Hi all
How can i select multiple objects by pressing CTRL key along with mouse left button as we do in windows environment.
my configuration:
os : windows xp
qt : 4.7.0
thanks.
setSelectionMode(QAbstractItemView::ExtendedSelect ion)
Thanks for ur reply.
But what I am doing is application for touch device it consist of label, button, spinbox etc.
What u suggest is, it will select icons only if I am not wrong.
What I want is "touch2.jpeg" but I am getting "touch1.jpeg". These two are attached bellow.
So please suggest me how and where i should store different types of widget so that if I select copy and then paste these object on label it will paste all objects. or is there any container Qt is providing to store and retrieve multiple objects of different type.
Thanks
touch1.JPG touch2.JPG
So what exactly is your problem? Selecting items? Copying them? Pasting them?
multiple selection.
Are you using graphics view or item views? And what have you tried so far?
What i am using is label and drawing image on it and for object that shows selected i.e. the object surrounded by small squares are also labels used for resizing and to show that this object is selected.
Next what i want is if I select multiple object using CTRL key and mouse press it will select that many object for copy paste purpose.
To achieve this i am checking " if (event->KeyPress == Qt::CTRL) " withing mousePressEvent. But i'm not getting the desired result.
thanks.
Eeeeeeemmmmm.... you really shouldn't be doing it this way. That's probably the worst possible approach to the problem. Doing it the way you want will be a load of (totally needless) work. Use either Graphics View or Item Views (whichever fits your usecase better).
vinod sharma (27th February 2012)
thank you for sharing knowledge.
Bookmarks