Results 1 to 7 of 7

Thread: swiping between buttons (touch) in Qt widget

  1. #1
    Join Date
    Jul 2015
    Posts
    8
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default swiping between buttons (touch) in Qt widget

    Hi
    I need to implement swiping between buttons by the user hand in touch screen (something similar to pictures paging in iPhone/android). I am working on Qt widget project on Linux machine (Qt embedded).
    I need to develop 2 rows (every row has 3 buttons ) and the user shall swipe between them.
    Is the preferred way is gestures?
    Does someone know a good example for swiping a list of widgets?
    Last edited by natile; 6th August 2015 at 10:40. Reason: mistake in title

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    You could try putting the buttons on a widget, then putting that widget in a scroll view.

    Cheers,
    _

  3. #3
    Join Date
    Jul 2015
    Posts
    8
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    Just to understand: you mean putting the buttons in widget control from the tool box?
    and by saying scrol view you mean scroll area?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    Yes, QScrollArea, sorry.

    It works on a single widget, so you first have to add your buttons to a container widget.

    Cheers,
    _

  5. #5
    Join Date
    Jul 2015
    Posts
    8
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    Few qusetions before I getting started:
    Is the scrollbar will be visible?
    Is it similar to scroll through the images on a smartphone?

    Nati

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    Quote Originally Posted by natile View Post
    Is the scrollbar will be visible?
    Your decision

    Quote Originally Posted by natile View Post
    Is it similar to scroll through the images on a smartphone?
    There are a lot of different ways to scroll through images on a smartphone: gallery lists or tables, cover art, single images, lists of files, etc.

    But if your goal is to make a phone/tablet like interface, then you will be better off using QtQuick instead of QtWidgets.

    Cheers,
    _

  7. #7
    Join Date
    Jul 2015
    Posts
    8
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: swiping between buttons (touch) in Qt widget

    did you meant to integrate QtQuick into my QtWidget project? cause I use existing project written in QtWidgets. I meant to the single images paging .

Similar Threads

  1. Touch screen wrong coordinates on touch
    By Talei in forum Qt Programming
    Replies: 0
    Last Post: 1st January 2014, 22:35
  2. Replies: 2
    Last Post: 25th June 2011, 05:41
  3. Replies: 1
    Last Post: 25th March 2011, 11:33
  4. Replies: 0
    Last Post: 26th February 2010, 12:16
  5. How to Implement the Touch Screen Events?
    By rchaitanya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 25th December 2008, 09:44

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.