PDA

View Full Version : swiping between buttons (touch) in Qt widget



natile
6th August 2015, 10:39
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?

anda_skoa
6th August 2015, 11:52
You could try putting the buttons on a widget, then putting that widget in a scroll view.

Cheers,
_

natile
6th August 2015, 16:05
Just to understand: you mean putting the buttons in widget control from the tool box?
and by saying scrol view you mean scroll area?

anda_skoa
6th August 2015, 18:13
Yes, QScrollArea, sorry.

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

Cheers,
_

natile
7th August 2015, 08:36
Few qusetions before I getting started:
Is the scrollbar will be visible?
Is it similar to scroll through the images on a smartphone?

Nati

anda_skoa
7th August 2015, 09:16
Is the scrollbar will be visible?

Your decision



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,
_

natile
7th August 2015, 11:25
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 .