#pyqt | Logs for 2018-10-07

Back
[00:07:09] -!- mintograde has quit [Ping timeout: 252 seconds]
[02:22:03] -!- mandeep has joined #pyqt
[02:35:29] -!- mandeep has quit [Quit: Leaving]
[03:33:03] -!- anqxyr has joined #pyqt
[04:51:33] -!- kallesbar has joined #pyqt
[06:19:35] -!- anqxyr has quit [Ping timeout: 268 seconds]
[07:54:56] -!- mintograde has joined #pyqt
[08:26:55] -!- mintograde has quit [Quit: Leaving]
[08:35:57] -!- mintograde has joined #pyqt
[09:53:01] -!- kgj6k has joined #pyqt
[09:54:00] -!- Afrix has joined #pyqt
[09:58:27] <kgj6k> I allow mouse wheel scrolling with this function in a QGraphicsView: https://stackoverflow.com -- but that conflicts with resizing the scene when the user changes the window size in self.resizeEvent() like this: self.fitInView(self.sceneRect(), self.aspectRatioMode). Any idea how to have both?
[09:59:17] <altendky> kgj6k: you want to automatically rescale the scene but also have manual control? do you want the window resize to force fit? or just to scale as per the window size delta? or maybe just drop scaling when resizing a window if it's a scroll wheel away
[10:02:10] <kgj6k> altendky: The main problem is that the image I show is not centered/visible anymore after the user resizes the window. I think I could drop the "resize image on window resize" behavior, but not having the image centered is kind of annoying
[10:02:46] <altendky> kgj6k: might have to store the center coordinates and recenter after the resize
[10:03:02] <altendky> (i don't know graphics view stuff so i am admittedly speaking generically)
[10:11:46] <altendky> or maybe the resize actually provides both old and new information? or there is an 'about to be resized' signal/event?
[10:11:59] <kgj6k> altendky: Hmm, yeah, something like that, but I'm unsure how to get center coordinates in resizeEvent(). Funnily enough, it centers perfectly if I scroll after resizing the window - but there you also have a mouse position to work with
[10:12:45] <altendky> kgj6k: i initially meant that any time the center changed you would store it. then it would be available when the resize occurred.
[10:22:21] <kgj6k> altendky: Ha! Something like self.scale(1.0001, 1.0001) in resizeEvent() does automatically center the image like I want. Now I should probably find out why exactly that is the case and only use the necessary functions :-)
[10:23:31] <altendky> kgj6k: oh, did you want it 'centered' rather than maintaining the existing center? i assumed the latter despite you using words for the former :|
[10:26:37] <kgj6k> Nah, I think your understanding was probably correct. But I have to say I'm also not exactly sure what I want, I'm pretty new to using Qt :x
[10:46:38] <kgj6k> altendky: Turns out that I don't need to override resizeEvent() at all... at least for the behavior I mentioned.
[10:47:53] <altendky> kgj6k: even better. what are you using now?
[10:48:01] <altendky> or, just nothing?
[11:00:49] -!- diK has joined #pyqt
[11:01:25] -!- diK has quit [Remote host closed the connection]
[11:02:44] -!- kallesbar has quit [Remote host closed the connection]
[11:03:35] -!- kallesbar has joined #pyqt
[11:24:44] -!- diK has joined #pyqt
[11:28:18] <kgj6k> altendky: just nothing! I hadn't tried that yet because I have some rubberband box on the screen that I need to manually resize, and that happened during resizeEvents until now
[11:46:04] -!- mandeep has joined #pyqt
[12:33:58] -!- mandeep has quit [Read error: Connection timed out]
[12:34:16] -!- mandeep has joined #pyqt
[13:23:41] -!- kgj6k has quit [Ping timeout: 256 seconds]
[13:53:11] -!- JanC_ has joined #pyqt
[13:53:11] -!- JanC has quit [Killed (niven.freenode.net (Nickname regained by services))]
[13:53:11] JanC_ is now known as JanC
[13:56:11] -!- kgj6k has joined #pyqt
[13:58:00] <kgj6k> How can I close the whole application from the main window? Calling self.close() does indeed close the window, but the application then runs forever in the last line here: https://pastebin.com
[14:08:33] <kgj6k> I think the problem might be that I sometimes want to close the application when the last line has not yet been called
[14:12:35] -!- kgj6k has quit [Quit: Page closed]
[14:34:25] -!- mandeep has quit [Quit: Leaving]
[15:18:51] -!- diK has quit [Quit: Leaving]
[16:06:12] -!- kallesbar has quit [Quit: Konversation terminated!]
[17:07:47] -!- mandeep has joined #pyqt
[17:57:53] -!- Afrix has quit [Quit: Leaving]
[22:38:28] -!- mintograde has quit [Ping timeout: 246 seconds]
[22:56:31] -!- mandeep has quit [Quit: Leaving]