PDA

View Full Version : How to make label swipe-able?



chong_kimkeang
10th October 2012, 08:54
I creates a Label on a border_image(background is the image) and now I want to make it swipe-able just to left and right on the background, and even it can go to left and right, in addition,I want to limit the length for label moving. How can I swipe? and How can I limit it?

wysota
10th October 2012, 09:08
What are you really trying to do? Maybe you should use QtQuick/QML instead of widgets?

chong_kimkeang
10th October 2012, 09:29
I want my app look like ipad or iphone app but without touch, I use mouse. I want to create an image background and another image over the image background then user can swipe the image that is over the background to left or to right. How can I do that? Can you give me ideas or sample of code?

wysota
10th October 2012, 11:17
Use QtQuick/QML.

chong_kimkeang
11th October 2012, 03:24
Sorry, can you give me a simple example because I seem not familiar with QtQuick / QML.

wysota
11th October 2012, 03:26
Sorry, can you give me a simple example because I seem not familiar with QtQuick / QML.

There are lots of examples in Qt docs. Take a closer look at the Flickable element.

chong_kimkeang
11th October 2012, 03:39
The code is written in .qml, how can I create this file with Visual Studio 2008 because I am using it? can you expand me more? these all are new to me.

wysota
11th October 2012, 03:52
QML files are plain text files.

chong_kimkeang
11th October 2012, 03:53
Ok, but how can I merge it in to my app in Visual Studio 2008? and it needs to import QtQuick namspace. How to include it?

wysota
11th October 2012, 03:58
Man... if you can't do it in Visual Studio then use Notepad. And if you still can't do it then use Qt Creator, it has a bunch of wizards for people who need buttons to push.

chong_kimkeang
11th October 2012, 04:03
Ok, thanks