Results 1 to 11 of 11

Thread: How to make label swipe-able?

  1. #1
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question How to make label swipe-able?

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make label swipe-able?

    What are you really trying to do? Maybe you should use QtQuick/QML instead of widgets?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How to make label swipe-able?

    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?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make label swipe-able?

    Use QtQuick/QML.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    chong_kimkeang (11th October 2012)

  6. #5
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How to make label swipe-able?

    Sorry, can you give me a simple example because I seem not familiar with QtQuick / QML.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make label swipe-able?

    Quote Originally Posted by chong_kimkeang View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. The following user says thank you to wysota for this useful post:

    chong_kimkeang (11th October 2012)

  9. #7
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How to make label swipe-able?

    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.
    Last edited by chong_kimkeang; 11th October 2012 at 04:49.

  10. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make label swipe-able?

    QML files are plain text files.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #9
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How to make label swipe-able?

    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?

  12. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make label swipe-able?

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #11
    Join Date
    Sep 2012
    Posts
    66
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: How to make label swipe-able?

    Ok, thanks
    Last edited by chong_kimkeang; 11th October 2012 at 05:27.

  14. The following user says thank you to chong_kimkeang for this useful post:


Similar Threads

  1. Swipe gesture not recognized
    By Luc4 in forum Qt Programming
    Replies: 2
    Last Post: 16th December 2014, 16:13
  2. Qt Designer How to make Button work with webwiev and a Label shows Mouse Position?
    By heavy.is.happy in forum Qt Tools
    Replies: 3
    Last Post: 8th July 2011, 20:26
  3. How to make a label be on the background?
    By Bong.Da.City in forum Newbie
    Replies: 3
    Last Post: 6th September 2010, 12:37
  4. How to make text in label or TextEDit to flash?
    By qtlinuxnewbie in forum Newbie
    Replies: 2
    Last Post: 6th April 2010, 08:53
  5. make label of QwtPlotMarker invisible
    By rambo83 in forum Qwt
    Replies: 1
    Last Post: 26th November 2009, 13:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.