#pyqt | Logs for 2018-09-18
Back
[00:13:01] -!- mandeep has joined #pyqt
[01:43:16] -!- mandeep has quit [Quit: Leaving]
[04:07:35] -!- anqxyr has joined #pyqt
[04:46:35] -!- anqxyr has quit [Read error: Connection reset by peer]
[04:47:08] -!- anqxyr has joined #pyqt
[04:48:52] -!- anqxyr has quit [Client Quit]
[06:16:56] -!- mintograde has joined #pyqt
[06:20:30] -!- BazookaTooth has quit [Remote host closed the connection]
[06:20:49] -!- BazookaTooth has joined #pyqt
[06:56:36] -!- mintograde has quit [Ping timeout: 252 seconds]
[07:21:52] -!- nitro25 has joined #pyqt
[08:22:53] -!- frispete_ has joined #pyqt
[08:24:30] -!- BPL has joined #pyqt
[08:25:53] -!- frispete has quit [Ping timeout: 245 seconds]
[08:37:47] -!- kallesbar has joined #pyqt
[09:11:52] -!- Siecje has joined #pyqt
[09:51:10] -!- frispete_ has quit [Remote host closed the connection]
[09:51:57] -!- frispete_ has joined #pyqt
[10:17:39] -!- frispete_ has quit [Remote host closed the connection]
[10:18:27] -!- frispete_ has joined #pyqt
[10:58:29] -!- hazzy-m has joined #pyqt
[14:54:16] -!- agile_prg has joined #pyqt
[15:07:28] -!- frispete_ has quit [Quit: Konversation terminated!]
[15:09:36] -!- frispete has joined #pyqt
[15:34:20] <hazzy-m> how do I connect to a QAction triggered signal that does not pass the checked arg?
[15:34:43] <altendky> hazzy-m: you want to ignore it?
[15:34:48] <hazzy-m> I tried action.triggered[()], but that gives me `KeyError: 'there is no matching overloaded signal'`
[15:34:51] <hazzy-m> yes
[15:35:13] <altendky> hazzy-m: just connect to something that doesn't take a parameter i think. but you say the triggered action is actually overloaded?
[15:35:45] <hazzy-m> Yes, it seems to default to the overloaded signal
[15:36:05] <altendky> hazzy-m: i only see one. where do you see an overloaded signal? http://doc.qt.io
[15:37:01] <hazzy-m> I would normally decorate the slot with pyqtSlot() to make it ignore the checked arg, and that works, but I am calling a module level method, so can't use the decorator
[15:37:37] <altendky> hazzy-m: so you in some way pass it through a thing that takes no args. could be directly to the module level function.
[15:38:12] <altendky> hazzy-m: hazard there is when you do make that take an optional arg and it then gets filled by the slot which isn't what you are intending and you get confused. or, at least, i do when i do that
[15:38:35] <altendky> there are times i avoid this by signal.connect(lambda: final_target())
[15:39:03] <hazzy-m> Yes, that is what is happening, the method takes an optional arg, and the checked arg fills it in :D
[15:39:07] <altendky> though it's ugly, has delayed evaluation of final_target, makes disconnecting impossible in that form (and more annoying even if you have a name for the intermediate...
[15:39:54] <altendky> hazzy-m: i've talked about this here before and i don't recall coming up with a great solution... i don't think... i wish my recollection was more clear though
[15:40:48] <hazzy-m> I was looking at the answer to this question: https://stackoverflow.com
[15:41:31] <hazzy-m> But that does not work, maybe something changes since it was written (or it was wrong ...)
[15:42:04] <altendky> hazzy-m: hmm... that'd be nice to have. maybe None? maybe that got dropped in pyqt5?
[15:42:10] <altendky> i'm going to look a bit
[15:42:56] <hazzy-m> I tried None "null" "" and "none", none of which worked :(
[15:43:25] <hazzy-m> thanks!
[15:43:37] <hazzy-m> oh, also tuple and list
[15:44:43] <altendky> hazzy-m: one year more recent :] https://riverbankcomputing.com
[15:46:12] <hazzy-m> "it's worth getting into the habit of
[15:46:13] <hazzy-m> always explicitly selecting the overload you want with signals that
[15:46:14] <hazzy-m> define default values, because it can be a very common source of bugs"
[15:46:15] <hazzy-m> Thant's True!!!
[15:46:25] <hazzy-m> ok, Ill try the tuple again
[15:47:39] <hazzy-m> sig = action.triggered[()]
[15:47:40] <hazzy-m> KeyError: 'there is no matching overloaded signal'
[15:47:41] <hazzy-m> :(
[15:47:53] <altendky> hazzy-m: ask the maillist...
[15:48:30] <hazzy-m> I will, thanks for proving that I am not crazy
[15:48:35] <hazzy-m> (in that instance)
[15:48:43] <altendky> hmm, i wonder if you connect with an overload and then you disconnect... which will it disconnect? you have to specify the overload again? though now we should get disconnectable things returned from .connect so...
[15:50:32] <hazzy-m> disconnect disconnects using the method ID right? So it would know which sig was connected (unless you connected to the method with both signals ...)
[15:50:55] <altendky> there's ambiguity in at least that case
[15:51:21] <altendky> but since the pyqt behavior was updated to match qt's and connect returns a thing that you can .disconnect(), not such a big deal
[15:51:32] <altendky> just hold onto the connection object (or whatever type it is)
[15:53:25] <hazzy-m> ah, I did not know QT returned anything from connect, nice!
[15:53:30] <hazzy-m> GTK returns an int identifier from connect
[15:58:01] <altendky> first raised in 2016. i bumped in 2017 https://www.riverbankcomputing.com then resolved in 2018 https://www.riverbankcomputing.com
[15:58:25] <altendky> http://pyqt.sourceforge.net
[15:59:33] <altendky> http://doc.qt.io
[15:59:44] <altendky> :[ it looks like you still have to keep track of the signal though
[16:04:12] -!- nitro25 has quit [Remote host closed the connection]
[16:47:10] -!- mintograde has joined #pyqt
[17:09:31] -!- necrose99 has joined #pyqt
[17:12:59] -!- Siecje has quit [Quit: Leaving.]
[17:42:04] -!- necrose99 has quit [Ping timeout: 240 seconds]
[17:50:42] -!- elixir42 has joined #pyqt
[18:06:39] -!- elixir42 has quit [Ping timeout: 252 seconds]
[20:06:18] -!- Belxjander has quit [Ping timeout: 252 seconds]
[21:16:38] -!- ralsina has quit [Remote host closed the connection]
[22:04:39] -!- mintograde has quit [Ping timeout: 252 seconds]
[22:06:57] -!- BPL has quit [Read error: Connection reset by peer]
[22:44:19] -!- kallesbar_ has joined #pyqt
[22:46:35] -!- kallesbar__ has joined #pyqt
[22:48:26] -!- kallesbar has quit [Ping timeout: 272 seconds]
[22:50:18] -!- kallesbar_ has quit [Ping timeout: 252 seconds]
[22:50:38] kallesbar__ is now known as kallesbar
[22:59:24] -!- necrose99 has joined #pyqt
[23:00:43] -!- kdas_ has joined #pyqt
[23:01:49] -!- kushal has quit [Ping timeout: 256 seconds]
[23:11:51] -!- kallesbar_ has joined #pyqt
[23:15:40] -!- kallesbar has quit [Ping timeout: 272 seconds]
[23:22:12] kallesbar_ is now known as kallesbar