Active Topics

 


Reply
Thread Tools
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#1
Hello,

I'm wondering if there is any way (with QT) to make drag&drop available only on certain direction (vertical for example).
Help/examples/links are welcome
 
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#2
Originally Posted by b0unc3 View Post
Hello,

I'm wondering if there is any way (with QT) to make drag&drop available only on certain direction (vertical for example).
Help/examples/links are welcome
you can easily drag n drop along chosen axis in QML, but I'm not sure how to implement it in directly in Qt. worth a look though, I gather:

http://doc.trolltech.com/4.7/qml-mousearea.html
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.
 

The Following User Says Thank You to mece For This Useful Post:
Posts: 203 | Thanked: 152 times | Joined on May 2009 @ Austria
#3
I had problems get drag&drop working in qt, so i have written my own one.
When i push a button, a timer starts and sets geometry of the button to the position of the mouse (or finger). When i release the mousebutton, the timer stops.
With this, you can make a rule that only the x or y property of the button is set to the mouse.

I use this in my app, an older sourcecode is available here:
svn checkout https://vcs.maemo.org/svn/drinkcounter
 

The Following User Says Thank You to AndiThebest For This Useful Post:
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#4
Hi,

thanks for the info... I think I'll try to use (or adapt) the solution pointed by AndiTheBest. But maybe I can try to stylize the QSlider to have (maybe it's easier) what I need.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:19.