#pyqt | Logs for 2018-11-22

Back
[01:11:24] -!- mandeep has quit [Ping timeout: 268 seconds]
[03:08:57] -!- anqxyr has joined #pyqt
[03:50:55] -!- kallesbar has joined #pyqt
[06:20:24] -!- mintograde has joined #pyqt
[06:53:25] -!- daegontaven has joined #pyqt
[07:03:08] -!- minto has joined #pyqt
[07:05:54] -!- mintograde has quit [Ping timeout: 252 seconds]
[08:18:03] -!- Lauxley has joined #pyqt
[08:36:50] -!- Siecje has joined #pyqt
[10:25:47] -!- Lauxley has quit [Ping timeout: 268 seconds]
[10:33:21] -!- TechSmurf has quit [Ping timeout: 252 seconds]
[10:35:00] -!- Lauxley has joined #pyqt
[11:46:46] -!- daegontaven has quit [Ping timeout: 260 seconds]
[11:58:56] -!- daegontaven has joined #pyqt
[12:23:33] -!- anqxyr has quit [Ping timeout: 252 seconds]
[13:00:52] -!- mandeep has joined #pyqt
[13:15:50] -!- minto has quit [Quit: Leaving]
[13:16:14] -!- mintograde has joined #pyqt
[15:54:15] -!- minto has joined #pyqt
[15:56:38] -!- mintograde has quit [Ping timeout: 272 seconds]
[16:06:29] -!- taven has joined #pyqt
[16:07:06] -!- daegontaven has quit [Ping timeout: 252 seconds]
[16:08:59] -!- anqxyr has joined #pyqt
[16:09:27] <anqxyr> haven't come around here for advice in awhile, must mean I'm improving
[16:09:48] <anqxyr> anyway, it's past midnight, so I won't stay long, but maybe there's something very obvious that I'm missing
[16:10:29] <anqxyr> I have a widget with .setWindowFlag(QtCore.Qt.ToolTip)
[16:10:53] <anqxyr> when its parent window moves, it's left floating in the same place where it was
[16:11:02] <anqxyr> I want to .hide() it when the window moves
[16:11:31] <anqxyr> I've tried to install an event filter on the window to hide the widget
[16:11:56] <anqxyr> https://monosnap.com
[16:12:59] <anqxyr> for the tooltip widget, self.window() is self, so I'm doing this:
[16:13:00] <anqxyr> https://monosnap.com
[16:13:08] <anqxyr> and nothing at all happens
[16:13:21] <anqxyr> any clues, anyone?
[16:16:18] <altendky> anqxyr: put in a print
[16:17:56] <anqxyr> https://monosnap.com
[16:18:01] <anqxyr> lots of 112, no 345
[16:18:29] <altendky> anqxyr: print the type
[16:18:56] <altendky> anqxyr: also, use isinstance() for type checking mostly
[16:19:17] <Avaris> eh, that's not type checking
[16:19:39] <Avaris> it's checking the type yes but no :)
[16:20:04] <altendky> Err, .type() hmm
[16:20:57] <altendky> anqxyr: http://doc.qt.io
[16:21:01] <anqxyr> no events seem to be generated by moving the window at all
[16:21:35] <altendky> But as I recall I have used isinstance in a situation like this, for better or worse
[16:23:55] <altendky> anqxyr: but, no 112 when you move?
[16:24:15] <anqxyr> hmmmm, looks like self.parent() is self.parent().window() is self.parent().window().window()
[16:24:32] <anqxyr> so my event filter is installed not on the window, but on the widget in that window
[16:24:44] <anqxyr> now to figure out how to get the top-most window
[16:24:58] <Avaris> wut?
[16:25:40] <anqxyr> hmmm, self.parent().parent() is None
[16:25:52] <anqxyr> so that explains the weird results from .window()
[16:26:17] <anqxyr> ok, I'll follow this rabbit hole to the end tomorrow
[16:26:19] <Avaris> can we see a bit more relevant code?
[16:27:35] <anqxyr> Avaris, this can probably be reproduced fairly easily
[16:28:01] <anqxyr> just init a QWidget without a parent, then check what .window() returns
[16:28:11] <Avaris> should be itself
[16:28:16] <anqxyr> yup
[16:28:23] <Avaris> and that's normal?
[16:28:48] <anqxyr> now, to figure out how it happened that the parent widget is orphaned, that's a whole another adventure
[16:29:04] <anqxyr> because I see that it gets a parent passed to it in init
[16:29:11] <anqxyr> so that parent must be None
[16:29:15] <anqxyr> such fun
[16:29:32] <anqxyr> anyway, thanks guys, I'll be going now, 1am soon
[16:29:47] <Avaris> o couple of lines worth a thousand lines of chat :)
[16:29:59] <Avaris> a couple lines of code *
[16:53:58] -!- anqxyr has quit [Read error: Connection reset by peer]
[17:32:01] -!- Siecje has quit [Quit: Leaving.]
[17:51:46] -!- Lauxley has quit [Remote host closed the connection]
[18:04:11] -!- kallesbar has quit [Quit: Konversation terminated!]
[19:23:02] -!- mandeep has quit [Ping timeout: 244 seconds]
[19:35:05] -!- mandeep has joined #pyqt
[20:16:33] -!- mandeep has quit [Ping timeout: 268 seconds]
[20:30:59] -!- mandeep has joined #pyqt
[22:51:22] -!- kallesbar has joined #pyqt
[23:58:36] -!- minto has quit [Ping timeout: 272 seconds]