#pyqt | Logs for 2018-11-03
Back
[00:10:07] -!- minto has quit [Ping timeout: 240 seconds]
[02:05:10] -!- kallesbar has quit [Quit: Konversation terminated!]
[02:34:47] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[02:35:14] -!- Belxjander has joined #pyqt
[03:31:18] -!- anqxyr has joined #pyqt
[03:50:55] <Mrokii> altendky: I used one of your examples to implement clickable labels in a grid layout. Thanks again for all the help.
[03:53:57] <Mrokii> At the moment I am having a problem about how to design a certain function. I want the user to be able to select/deselect the images in the grid layout. I am just not sure what a good way would be to show the user what has been selected. One way could be to draw a border around selected images, another might be to include a checkmark-widget within each cell, to show the (un)selected status...
[05:03:55] -!- Mrokii has quit [Quit: WeeChat 2.2]
[05:04:37] -!- Mrokii has joined #pyqt
[05:26:12] -!- Belxjander has quit [Ping timeout: 252 seconds]
[05:49:01] -!- kallesbar has joined #pyqt
[06:09:39] -!- Belxjander has joined #pyqt
[07:03:14] <Avaris> probably a green border or overlay would be my first try
[07:12:15] <Mrokii> Avaris: I ended up drawing a simple border, repainting the label each time the user clicked it.
[07:12:40] <Mrokii> Which works nicely, as it seems.
[07:37:52] -!- mintograde has joined #pyqt
[09:12:01] -!- Bjander has joined #pyqt
[09:12:08] -!- Belxjander has quit [Ping timeout: 245 seconds]
[09:12:24] Bjander is now known as Belxjander
[09:20:55] -!- Belxjander has quit [Ping timeout: 246 seconds]
[09:26:46] -!- Belxjander has joined #pyqt
[09:30:50] <altendky> I feel like there should be a widget for this already...
[09:31:59] <altendky> Mrokii: there's digikam which is qt, and gwenview. I think they are c++ but you could still look at how they do it.
[10:04:18] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[10:04:49] -!- Belxjander has joined #pyqt
[11:27:28] <Mrokii> altendky: I think I have that one installed.
[11:27:55] <Mrokii> drawing a border around selected images really looks like the most natural thing to do, atm.
[11:27:58] <altendky> Mrokii: i was referring to looking at the source, but considering their gui choices could be good as well
[11:28:13] <altendky> Mrokii: i'd say it also depends if you want native looking stuff or not
[11:28:52] <Mrokii> altendky: Ah, I see. That's a good idea,
[11:29:29] <altendky> i'm wondering if a flow layout sort of thing could be useful. there's one as an example in the qt docs
[11:29:31] <Mrokii> There's also Calibre which is written in Qt and even Python, but I think these are all rather complex.
[11:30:19] <altendky> Mrokii: but you may find a useful basic structure they use. you could use a table view but that seems unlikely to be great. maybe ok though, i dunno
[11:32:39] <Mrokii> altendky: Somebody on qt had suggested that as well, as it would handle selection and clicking... But using a TableView could lead to just another bunch of headache inducing issues with the concepts I want to implement. :)
[11:32:59] <altendky> Mrokii: concepts like?
[11:33:17] <altendky> first thing i think of is that shift selection wouldn't default to working as expected
[11:33:53] <altendky> but that's exactly the sort of reason finding a builtin that can be sensibly used is valuable
[11:34:04] <altendky> (if you can find a good one)
[11:35:36] <altendky> have you looked at qml options?
[11:35:48] <Mrokii> I'm mostly hesitant at the moment about rethinking the way I'm using to display the images. :)
[11:36:18] <altendky> Mrokii: what do you mean?
[11:37:35] <Mrokii> Just that, at the moment the grid works fine and I am hesitant of replacing all that stuff with a TableView or whatever else.
[11:37:52] <altendky> Mrokii: it works fine except that it doesn't have all the features you want?
[11:38:34] <altendky> Mrokii: i don't have a better solution to suggest yet but i am encouraging you to keep in mind that what works well for a subset of features isn't always the best choice for implementing the full set of features
[11:38:56] <altendky> especially if you want native look and feel (which you haven't clarified)
[11:39:10] <Mrokii> Yes, I understand what you mean.
[11:39:36] <altendky> Mrokii: i also think it's odd for qt not to have a good thing for this so i'm looking in case i just haven't heard of it before
[11:40:45] <altendky> https://forum.qt.io suggests something similar to what you have but with buttons
[11:41:19] <altendky> https://stackoverflow.com
[11:41:51] <Mrokii> To give a bit more of a perspective: I am working on a memory-game and as I'm not very experienced I am learning things along the way while implementing them. So there may be very well be better solutions to what I am using at the moment.
[11:42:08] <Mrokii> And I am going for a native look for all the regular GUI-elements and windows.
[11:42:15] <altendky> Mrokii: a memory game that you have to scroll around to see the whole board?
[11:43:02] <Mrokii> Nope, the scroll area is only for the preferences. I want the user to be able to choose folders *and* give them the possibility to select images in that folder, if they want to.
[11:43:23] <Mrokii> The main play area will not be scrollable.
[11:43:32] <altendky> Mrokii: oh, if no scrolling then probably just a gridlayout
[11:43:44] <altendky> but i'm still glad to have learned this about the list view
[11:44:07] <Mrokii> The scrolling is fine for the preferences-window, where people only choose the selection of images.
[11:44:41] <altendky> Mrokii: either let the widgets in the grid resize to fit or set them to show the image fixed size but allow space to fill in between them
[11:44:47] <altendky> (i'd guess the former)
[11:45:05] <altendky> Mrokii: why do you need a fixed size for the 'cards'?
[11:48:40] <Mrokii> I don't really need a fixed size, just a maximum-size, so that the images aren't displayed too huge. AS the player can choose any kind of image-folder, they could have images with a few thousand pixels wide and high, and they need to be made small enough to be visible in some kind of grid.
[11:49:56] <Mrokii> At the moment, I am using one of your examples you've given me the links to. They work nicely to show imaages in columns and rows and they grow and shrink when the window is resized.
[11:53:28] <Mrokii> There is in fact the question of how to let the user select the images more than one image at once, a problem I hadn't thought about too much until just recently. But in that case, a TableView might actually be a better solution, at least for the preferences window. The grid layout, on the other hand, seems to be perfect for the playing area, where the only user-interaction is clicking the images.
[11:55:22] <altendky> Mrokii: but you don't want general native multi-select, do you?
[11:55:32] <altendky> Mrokii: rather, you want a click to flip one over or back?
[11:56:02] <altendky> Mrokii: and maybe when you have flipped two (or three or whatever) it either leaves them if they match and 'resets' or flips them back over and resets
[11:56:08] <Mrokii> altendky: I don't *mind* having the multi-select possibility in the preferences-window where the user selects which images they want to activate for a game.
[11:56:33] <Mrokii> But on the main play area, there's no need for selection, just for clicking the images.
[11:56:36] <altendky> Mrokii: yes, the list view could make sense for listing images in a directory
[11:57:13] <altendky> Mrokii: maybe also look at the qfilesystemmodel and any related view
[11:57:15] <altendky> views
[11:58:12] -!- Belxjander has quit [Ping timeout: 268 seconds]
[11:58:27] <Mrokii> I am not sure about how to react to found pairs in the play area, but if there's any possibility I want to give the user a choice of what happens to the cards.
[11:59:18] -!- Belxjander has joined #pyqt
[12:00:11] <Mrokii> That's why my system used in the preferences window is a tiny bit complicated, I guess. :) Giving the player choices, I mean. They can choose folders, then create cardsets (which are collections of folders), and within these cardsets, the user are able to chose individual images, if they want to. :)
[12:03:35] <Mrokii> For the file-system I am using a mixture of Python-modules and Qt at the moment. I am working with Python 3.x, so I am using the Path-module, but also things like QStandardPaths.AppDataLocation, to get a standard-folder to save preferences.
[12:03:46] <altendky> what about showing directories in one tree along with files they have saved with selected groups?
[12:04:14] <altendky> Mrokii: there are specific models (and maybe views? i forget) for showing filesystem stuff
[12:04:42] <altendky> http://doc.qt.io
[12:06:01] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[12:06:25] <Mrokii> I have thought about using a treeview, but I am not sure if this is a bit too complicated for the average user. I kind of like the visual separation between the folders that the user chose and the cardsets they created.
[12:06:27] -!- Belxjander has joined #pyqt
[12:07:24] <altendky> alrighty. i figured since a directory and a cardset are quite similar, it might be useful to be able to select them in the same place
[12:07:45] <altendky> perhaps a secondary flat list would show 'favorited' sets (be they directories or hand-picked sets)
[12:08:24] <altendky> and a third thing (icon mode list view?) could show the images from whatever thing was selected from the other two widgets
[12:08:35] <Mrokii> yes, that's a possibility. All these things are in the flow, so to say. If there's a system I like more, I have no problems changing things.
[12:21:00] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[12:21:28] -!- Belxjander has joined #pyqt
[12:21:38] -!- JT-Shop has joined #pyqt
[12:44:29] <Mrokii> altendky: Just in case you're interested, this is how the section to create cardsets, select included folders and images looks like: https://unsee.cc
[12:47:03] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[12:47:05] <altendky> Mrokii: thanks
[12:47:26] -!- Belxjander has joined #pyqt
[12:48:38] <Mrokii> altendky: I have to thank for all the help you've given me.
[12:48:51] <Mrokii> But you're welcome as well. :)
[15:01:30] -!- Belxjander has quit [Ping timeout: 252 seconds]
[15:02:39] -!- Belxjander has joined #pyqt
[15:50:43] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[15:51:06] -!- Belxjander has joined #pyqt
[15:52:24] -!- mintograde has quit [Read error: Connection reset by peer]
[15:58:04] -!- mintograde has joined #pyqt
[16:00:26] -!- mintograde has quit [Read error: Connection reset by peer]
[16:04:07] -!- mintograde has joined #pyqt
[16:31:42] -!- Belxjander has quit [Ping timeout: 252 seconds]
[16:32:00] -!- anqxyr has quit [Ping timeout: 268 seconds]
[16:35:06] -!- Belxjander has joined #pyqt
[16:52:05] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[16:52:29] -!- Belxjander has joined #pyqt
[17:45:22] -!- kallesbar has quit [Quit: Konversation terminated!]
[20:11:02] -!- kdas_ has joined #pyqt
[20:11:45] -!- kushal has quit [Ping timeout: 256 seconds]
[20:14:49] -!- Bjander has joined #pyqt
[20:15:00] -!- Belxjander has quit [Ping timeout: 252 seconds]
[20:15:12] Bjander is now known as Belxjander
[20:19:27] -!- Belxjander has quit [Ping timeout: 240 seconds]
[20:34:23] -!- Belxjander has joined #pyqt
[22:07:58] -!- logs has quit [Ping timeout: 245 seconds]
[22:09:08] -!- logs has joined #pyqt
[22:25:58] -!- mintograde has quit [Ping timeout: 246 seconds]