#pyqt | Logs for 2018-11-14

Back
[02:19:38] -!- kallesbar_ has joined #pyqt
[02:22:59] -!- kallesbar has quit [Ping timeout: 268 seconds]
[02:24:19] kallesbar_ is now known as kallesbar
[02:27:34] -!- Lauxley has joined #pyqt
[02:33:07] -!- JT-Shop has quit [Ping timeout: 240 seconds]
[03:06:06] -!- anqxyr has joined #pyqt
[03:34:57] -!- anqxyr has quit [Ping timeout: 252 seconds]
[06:20:26] -!- mintograde has joined #pyqt
[07:07:53] -!- mintograde has quit [Ping timeout: 268 seconds]
[07:43:39] -!- linuxson has joined #pyqt
[07:44:56] <linuxson> There any file or resource one can target manually to edit the size of that ugly default clear button for QLineEdit widgets?
[08:50:18] -!- Siecje has joined #pyqt
[09:41:42] -!- linuxson has quit []
[09:49:49] -!- Lauxley has quit [Remote host closed the connection]
[10:47:04] -!- kdas_ has joined #pyqt
[10:48:35] -!- kushal has quit [Ping timeout: 256 seconds]
[11:38:38] -!- TunaLobster has joined #pyqt
[11:50:08] -!- kallesbar has quit [Quit: Konversation terminated!]
[12:29:10] -!- TunaLobster has quit [Ping timeout: 268 seconds]
[12:30:11] -!- Lauxley has joined #pyqt
[13:09:25] kdas_ is now known as kushal
[13:34:59] -!- TunaLobster has joined #pyqt
[13:38:07] -!- TunaLobster has quit [Client Quit]
[15:09:42] -!- BPL has joined #pyqt
[15:33:28] -!- necrose99 has joined #pyqt
[15:34:30] -!- Mrokii has joined #pyqt
[15:35:24] <Mrokii> Hello. Is there a way to get the size and/or aspect ratio of a cell in a grid layout?
[15:37:29] -!- necrose99_ has joined #pyqt
[15:38:38] -!- necrose99 has quit [Ping timeout: 250 seconds]
[15:39:32] <Mrokii> To give a bit of a background: I have a memory game (where the user has to find pairs of cards). For the moment I have simply drawn a black square above cards that aren't found. That works fine as long as the images are of the same aspect ratio only. If it's different, the black squares aspect ratio gives a hint about the images. So the question is: How could I draw an one-coloured square that is always the
[15:39:34] <Mrokii> same aspect ratio above all images. My assumption is that I would first need to draw the images, then get the aspect ratio of one cell and then draw a one-coloured square on each of the gridlayouts' cells... But I don't know how to get one cells' dimension or even if that is the best way to do that. Any ideas?
[15:52:56] -!- necrose99_ has quit [Ping timeout: 250 seconds]
[16:03:51] <altendky> Mrokii: how about a stacked layout or widget in each cell? One page has whatever widget you user to maintain aspect ratio, the other is just filled with a widget that sets the background color or whatever
[16:06:44] <Mrokii> altendky: I need to look into that. Thanks for the suggestions.
[16:09:18] <altendky> Mrokii: I guess my two defaults here are 1) you don't want the image shown, so don't show it (rather than showing it and drawing over it) and 2) you don't actually care about the size so solutions that don't involve checking the size are good. Of course, sometimes it doesn't pan out but I'd start there.
[16:13:26] <Avaris> Mrokii: wait... are images in different sizes?
[16:21:20] <Mrokii> altendky: I don't actually need to show/draw the image as long as the cards aren't turned and the image is revealed, that's true. I hadn't thought about that yet, but I guess I could just draw a square into every grid-cell, symbolising the hidden cards. And I actually wouldn't need to care about the size of the images. It's just that I need/want to show a one-coloured square for the hidden cards. But there may
[16:21:22] <Mrokii> be the problem (haven't checked that yet), that the cells might change their size, once I flip from the square to the image. But I haven't checked that yet, of course.
[16:21:51] <Mrokii> Avaris: They can potentially be in different sizes, yes, as the user can choose any images-folder to play with.
[16:22:10] <Mrokii> Avaris: But I think the main problem isn't the size but the aspect ratio.
[16:23:11] <Mrokii> Avaris: Qt arranges the images in grid so all fits into the window already.
[16:24:05] <altendky> Mrokii: as I recall, stacked layout and widget won't change when you switch pages. They consider all pages when sizing.
[16:24:28] <altendky> Mrokii: and presumably you might like to just show scouter image... Like the back of a card
[16:24:34] <altendky> *another image
[16:26:14] <Mrokii> altendky: Yes, true, that's the intention.
[16:26:38] <Mrokii> I will definitely look into stacked layout/widgets.
[16:43:36] <Avaris> yeah stacked layout is a good option.
[16:44:22] <Avaris> i'd probably go with a custom qwidget that paints the image or a full black/card back whatever based on a flag
[16:45:41] -!- mandeep has joined #pyqt
[16:47:23] <Avaris> Mrokii: how are you drawing the black square currently?
[17:00:20] -!- mintograde has joined #pyqt
[17:13:46] -!- Siecje has quit [Quit: Leaving.]
[17:49:47] -!- mandeep has quit [Quit: Leaving]
[17:58:57] -!- Lauxley has quit [Read error: Connection reset by peer]
[18:46:58] -!- BPL has quit [Quit: Leaving]
[19:21:00] -!- JanC has quit [Remote host closed the connection]
[19:21:16] -!- JanC has joined #pyqt
[20:20:11] -!- mandeep has joined #pyqt
[20:21:27] -!- necrose99 has joined #pyqt
[20:24:43] -!- necrose99_ has joined #pyqt
[20:25:48] -!- necrose99b has joined #pyqt
[20:26:45] -!- necrose99b has quit [Remote host closed the connection]
[20:27:09] -!- necrose99b has joined #pyqt
[20:28:54] -!- necrose99 has quit [Ping timeout: 252 seconds]
[20:29:27] -!- necrose99_ has quit [Ping timeout: 250 seconds]
[20:30:06] -!- necrose99 has joined #pyqt
[20:32:55] -!- necrose99b has quit [Ping timeout: 250 seconds]
[20:34:39] -!- necrose99 has quit [Ping timeout: 250 seconds]
[21:23:48] -!- necrose99_ has joined #pyqt
[21:25:35] -!- necrose99b has joined #pyqt
[21:29:42] -!- necrose99_ has quit [Ping timeout: 276 seconds]
[21:32:42] -!- necrose99b has quit [Ping timeout: 252 seconds]
[21:48:23] -!- mintograde has quit [Ping timeout: 245 seconds]
[22:18:06] -!- Bjander has joined #pyqt
[22:21:39] -!- Belxjander has quit [Ping timeout: 252 seconds]
[22:21:39] Bjander is now known as Belxjander
[22:35:19] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[22:36:05] -!- Belxjander has joined #pyqt
[22:54:26] -!- Mrokii_ has joined #pyqt
[22:57:33] -!- Mrokii has quit [Ping timeout: 268 seconds]
[22:57:33] Mrokii_ is now known as Mrokii
[23:12:00] -!- JanC has quit [Remote host closed the connection]
[23:18:49] -!- JanC has joined #pyqt
[23:32:00] -!- rubenwardy has quit [Read error: Connection reset by peer]
[23:33:15] -!- rubenwardy has joined #pyqt
[23:39:42] -!- mandeep has quit [Ping timeout: 244 seconds]