Ask / Submit
1

SilicaListView + SnapOneItem

asked 2015-10-02 02:35:22 +0300

Huholoman gravatar image

updated 2015-10-03 04:15:22 +0300

##Hello, i have SilicaListView and im browsing items one by one.. And i want menu here (with delete for example), but i have no idea, how to do it. I tryed PullDownMenu, but it does not work.

Does anyone can help me with creating some menu? Any link or suggestion would be cool.

Thanks!

Edit: I will try to specify more my problem: I have grid with images. I choose one and open it, then i can slide left/right to go to previous or next image, which i achieved using
SilicaListView { snapMode: ListView.SnapOneItem }

But now i want to tap on that image and be able to use (drawer too, but that is not the problem) the PullDownMenu. It is the same behaviour like Sailfish Gallery app.

I hope it is clearer now :)

Edit2: I tryed to have Drawer in SilicaListView, but there was problem i could not swap back to the grid view, it just changed the current item to the previous one. So i put SilicaListView in Drawer.. IMHO it should work, but my application stops responding. Im passing model and currentIndex to SilicaListView using property alias in top elemen. I will be very happy for any hint why my application stops respond. my code

Edit3: Ok, im retarded. Problem solved, here is the correct code if anyone is interested in.

edit retag flag offensive close delete

Comments

I commented my answer, please try that out as it is the same behavior as in Gallery as you requested.

jollailija ( 2015-10-02 13:54:20 +0300 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2015-10-02 10:57:43 +0300

If I understand you correctly, you want a drawer with a list and a pulldownmenu. Check "Popup Panels" at Component Gallery example app provided with SDK.

edit flag offensive delete publish link more

Comments

Thank you for your suggestion, but i have quite different problem :/ I edited my question and tryed to expand description of my problem.

Huholoman ( 2015-10-02 13:43:32 +0300 )edit

@Huholoman Please see line 13 of this paste: http://pastebin.com/SYfD0Yyn The PullDownMenu needs to be placed inside the SilicaListView that is inside the Drawer.

jollailija ( 2015-10-02 13:53:40 +0300 )edit

Aha! I probably got it. Thank you!

I actualy saw that line befor ur comment.. But i missunderstand the component at first.

Huholoman ( 2015-10-02 17:45:12 +0300 )edit
0

answered 2015-10-02 03:34:26 +0300

Tanghus gravatar image

updated 2015-10-02 03:35:55 +0300

You're probably looking for the ContextMenu

edit flag offensive delete publish link more

Comments

I would like to use the PullDownMenu as it is in official Sailfish OS Gallery app. When you open some image in the grid of all pictures, you have the picture expanded. When you tap on it, some shared functionality apeares above it and you can use the PullDownMenu. Maybe i have to use another SilicaView, or maybe i need to combine them using states... I really don't know, i'm new to this. Right now im taking a look at SlideshowView, but im not going to try it now.

Edit: PullDownMenu in official Sailfish OS Gallery app

Huholoman ( 2015-10-02 04:34:35 +0300 )edit

I don't know how to automatically expand a PullDownMenu and frankly that is not what you're asking for in your opening question.

PullDownMenu is for separate items, not for lists. Maybe if you could be more specific to what you want to achieve it would be easier to give you an answer.

Tanghus ( 2015-10-02 05:15:42 +0300 )edit

Yes, I didn't explaine my problem correctly, I am sorry for that. I want same behaviour as the official Gallery app while browsing images. And I think i found solution using states, I haven't tryed it yet, but I think, it might work.

Huholoman ( 2015-10-02 05:46:23 +0300 )edit

Yes states is a very versatile tool. I have yet to exploit the full potential of it. God Bless QML ;)

Tanghus ( 2015-10-02 06:03:48 +0300 )edit
1

@Huholoman ContextMenu is official Silica component and it is exactly what is being used Gallery for menu appearing for each item and what you wrongfuly call "PullDownMenu for separate items". PullDownMeny is what appear when touch the screen and then pull it down, it's not for every item in list

virgi26 ( 2015-10-02 10:49:36 +0300 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-10-02 02:35:22 +0300

Seen: 352 times

Last updated: Oct 03 '15