#pyqt | Logs for 2019-01-07
Back
[01:33:05] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[01:33:35] -!- Belxjander has joined #pyqt
[02:31:49] -!- kallesbar has joined #pyqt
[03:20:35] -!- BPL has joined #pyqt
[04:34:15] -!- anqxyr has joined #pyqt
[05:19:57] -!- Mrokii has joined #pyqt
[05:20:48] <Mrokii> Is it possible to get the former selected value from a QComboBox after the "currentIndexChanged"-event happened? Do I need to create a custom model maybe? And if so, what would I have to implement there?
[06:29:05] -!- Belxjander has quit [Max SendQ exceeded]
[06:32:07] -!- Belxjander has joined #pyqt
[06:57:57] -!- russw has quit [Read error: Connection reset by peer]
[08:15:10] -!- rubenwardy has joined #pyqt
[09:05:59] <altendky> Mrokii: worst case you just store the previous value when having the signal.
[09:07:12] <altendky> Mrokii: but what do you mean after the event? While handing the signal? Signals and events are separate systems in qt
[09:08:10] <altendky> *handling
[09:09:31] <Mrokii> altendky: I found a way to do what I want. I use something like "combobox.setProperty("lastitem", index) when I initialize the combobox and when another item is chosen I can access that value.
[09:10:39] <Mrokii> Works nicely without the need for subclasses or specifically defined models.
[09:16:14] -!- russw has joined #pyqt
[09:27:21] -!- nsizemor has joined #pyqt
[09:44:06] -!- anqxyr has quit [Ping timeout: 250 seconds]
[12:29:05] -!- BPL has quit [Quit: Leaving]
[12:54:07] -!- mandeep has joined #pyqt
[13:01:17] -!- mandeep has quit [Remote host closed the connection]
[13:02:38] -!- mandeep has joined #pyqt
[13:05:58] -!- mandeep has quit [Remote host closed the connection]
[13:17:57] <Avaris> I have an excepthook and want to display the exception in a messagebox. Doing that in excepthook isn't working if exception happens in a thread. No GUI stuff outside main thread, etc... only way I cound find is to post a custom event with qApp.postEvent to a dummy "handler" qobject that does messagebox-ing. any other way?
[13:18:38] <altendky> Avaris: i think i've got something in my thread, presumably i emit a signal back to the gui thread
[13:19:09] <altendky> but wait, excepthook...
[13:20:03] <Avaris> yeah, i don't have try excepts in the thread, right now
[13:20:19] <altendky> Avaris: you need to get back to the main thread so i'd think signals would be the first tool. but whatever. same gist
[13:20:39] <altendky> i should add that to my excepthook to make sure it's in the main thread and provide a mechanism for getting there
[13:23:22] <Avaris> osx 10.14 particularly doesn't like that `GUI in thread` thing and crashes weirdly. gui is frozen and you have to kill the process
[13:36:43] -!- mandeep has joined #pyqt
[13:36:50] -!- mandeep has quit [Max SendQ exceeded]
[13:39:26] -!- kallesbar has quit [Quit: Konversation terminated!]
[14:47:00] <altendky> russw: did you catch my messages from the other day about pyqt5qmlscene working?
[14:53:32] -!- AbleBacon has joined #pyqt
[14:54:03] <AbleBacon> is there a way to set column width in a 'QHBoxLayout' for each column as a percent? i remember there was a way to do this in QML with C++ when that's what i was using
[14:56:04] <AbleBacon> nvm! found it! just had to trying googling different phrases. https://stackoverflow.com
[14:58:20] <Avaris> AbleBacon: fwiw, that's called stretch and can also be set later with `setStretch`
[14:58:27] <AbleBacon> thankis
[14:58:29] <AbleBacon> thanks*
[15:03:54] <AbleBacon> hmm... "addStretch(2)" is giving me a different amount of spacing than "addWidget(QLabel("Site:"), 2)"
[15:14:55] <AbleBacon> i'll just add the space using an empty QLabel i suppose
[15:15:11] <altendky> AbleBacon: what layout are you trying to achieve?
[15:15:30] <AbleBacon> one sec i'll screenshot it
[15:16:29] <AbleBacon> altendky, https://imgur.com
[15:16:45] <altendky> AbleBacon: grid it looks like
[15:16:50] <AbleBacon> that's what it supposed to look like, but with "add stretch" that little space at the end of the top row is too small proportionally
[15:17:04] <AbleBacon> well, i want to keep the two rows as separate widgets
[15:17:34] <altendky> AbleBacon: that's not great then. i would have a class that has multiple widgets and shoves them in a grid probably
[15:18:11] <altendky> unless there's some secret way to get qt to maintain alignment with cousin widgets (not layout cousins, but through widget parent cousings
[15:18:49] <AbleBacon> i'm fine with having the proportions hard-coded in--i just as long as they're consistent
[15:18:53] <altendky> AbleBacon: why do you want them as separate widgets?
[15:19:06] <altendky> well, separate compound widgets
[15:19:15] <AbleBacon> because they have different functionalities and interact with different other files
[15:19:55] <altendky> AbleBacon: does the 'container widget' have any special widget functionality? or just 'business logic' functionality?
[15:20:13] <altendky> if the latter, it really need not be a widget. it can just hold references to the individual widgets
[15:20:19] <AbleBacon> i'm not sure what you mean, but i think it's just business logic
[15:20:21] <altendky> and be a 'regular' class
[15:49:54] -!- daegontaven has joined #pyqt
[16:35:52] -!- daegontaven has quit [Quit: Leaving]
[16:44:56] -!- mintograde has joined #pyqt
[17:35:51] -!- russw has quit [Ping timeout: 244 seconds]
[18:00:06] -!- AbleBacon has quit [Quit: Leaving]
[18:30:54] -!- nsizemor has quit [Quit: nsizemor]
[19:22:05] -!- Belxjander has quit [Max SendQ exceeded]
[19:25:46] -!- Belxjander has joined #pyqt
[20:45:48] -!- Belxjander has quit [Ping timeout: 250 seconds]
[20:46:15] -!- Belxjander has joined #pyqt
[22:32:04] -!- Mrokii_ has joined #pyqt
[22:35:52] -!- Mrokii has quit [Ping timeout: 250 seconds]
[22:35:52] Mrokii_ is now known as Mrokii
[22:41:04] -!- mintograde has quit [Ping timeout: 250 seconds]
[22:55:16] -!- Belxjander has quit [Ping timeout: 258 seconds]
[22:59:37] -!- Belxjander has joined #pyqt
[23:41:47] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[23:42:19] -!- Belxjander has joined #pyqt