#pyqt | Logs for 2020-06-15

Back
[00:36:51] -!- Bjander has joined #pyqt
[00:39:49] -!- Belxjander has quit [Ping timeout: 264 seconds]
[00:39:50] Bjander is now known as Belxjander
[02:24:07] -!- sazawal has joined #pyqt
[02:24:28] -!- sazawal has quit [Max SendQ exceeded]
[02:25:06] -!- sazawal has joined #pyqt
[02:27:04] -!- sazawal has quit [Client Quit]
[02:27:20] -!- sazawal has joined #pyqt
[02:31:38] -!- jmarsac has joined #pyqt
[02:32:27] -!- sazawal has quit [Ping timeout: 260 seconds]
[02:33:14] -!- jmarsac_ has joined #pyqt
[02:35:00] -!- alexhugo has quit [Ping timeout: 256 seconds]
[02:37:17] -!- jmarsac has quit [Ping timeout: 272 seconds]
[03:09:11] -!- cottoneyejim has joined #pyqt
[03:16:56] -!- yustin has joined #pyqt
[03:25:44] -!- cottoneyejim has quit [Quit: cottoneyejim]
[03:30:52] -!- alexhugo has joined #pyqt
[03:43:34] -!- BPL has joined #pyqt
[04:30:48] -!- sazawal has joined #pyqt
[04:32:33] -!- sazawal has quit [Read error: Connection reset by peer]
[05:15:13] -!- alexhugo has quit [Ping timeout: 264 seconds]
[06:10:52] -!- alexhugo has joined #pyqt
[07:21:39] -!- jmarsac_ has quit [Ping timeout: 272 seconds]
[07:54:55] -!- alexhugo has quit [Ping timeout: 260 seconds]
[08:34:59] -!- jmarsac_ has joined #pyqt
[08:51:01] -!- alexhugo has joined #pyqt
[10:06:42] -!- sazawal has joined #pyqt
[10:09:29] <sazawal> How can I put a QWidget in a dropdown menu? I don't know what it is called, it is like a QDialog but not floating, attached to the clicked button.
[10:10:15] <altendky> sazawal: what sort of widget? how interactive?
[10:10:51] <sazawal> altendky, Yes interactive. Couple of QComboBoxes and QPushButton
[10:11:01] <sazawal> They are common in webapps
[10:11:21] <sazawal> Basically a form popping up on click, but attached to the button.
[10:11:57] <altendky> sazawal: seems a big excessive in a popup. but since you don't want a menu at all you may end up just showing your widget manually.
[10:12:01] <altendky> *bit excessive
[10:12:21] <sazawal> I see
[10:12:21] <altendky> as opposed to just a regular dialog popping up
[10:14:08] <altendky> what i'm hearing is a main window/button expanding to a multi-widget-thingy where some of those widgets expand out their drop-down lists. more than one layer of nesting like this (outside of nested menus) just doesn't feel great to me. a dialog isolates it so the user is interacting with that separate window and then there's just the one dangling layer of the dropdowns inside the dialog
[10:14:20] <altendky> but, perhaps i'm off-base on this ux consideration
[10:15:04] <altendky> if you do just pop it up you'll have the question of arbitrarily locating it within the existing window vs. letting it be it's own top level (i think the former is a choice at least)
[10:18:42] <sazawal> I currently have a QDialog, and thought maybe keeping it attached would make the look cleaner. Anyway, I will see if it is really necessary.
[10:20:16] <altendky> maybe it could be an area that is normally hidden but expands and shifts everything else rather than popping up over other stuff? i don't know the ui context so... also maybe very much not
[10:22:24] <sazawal> Yes I guess that could be done, or using a QStackedWidget should do.
[10:36:54] -!- yustin has quit [Ping timeout: 240 seconds]
[10:51:23] -!- sazawal has quit [Quit: Leaving]
[11:49:20] -!- cottoneyejim has joined #pyqt
[12:29:20] -!- kushal has quit [Remote host closed the connection]
[12:29:38] -!- kushal has joined #pyqt
[13:04:54] -!- plutopotamus has quit [Ping timeout: 240 seconds]
[13:20:39] -!- cottoneyejim has quit [Ping timeout: 260 seconds]
[13:25:54] -!- jmarsac__ has joined #pyqt
[13:29:37] -!- jmarsac_ has quit [Ping timeout: 272 seconds]
[13:40:52] -!- cottoneyejim has joined #pyqt
[13:41:54] -!- frispete_ has quit [Ping timeout: 256 seconds]
[13:50:53] -!- plutopotamus has joined #pyqt
[13:51:09] -!- jmarsac__ has quit [Ping timeout: 272 seconds]
[13:54:26] <ali1234> today i need yet another thing... i need to make a tree view in my app, and i need it to pull data from a tree of python objects... and i need two way synchronization. i assume this is going to end up needing lots of properties, signals, and slots, and maybe also callbacks from the python objects
[13:54:59] <ali1234> the catch is that the python objects can't know about Qt at all, because they are used in the CLI version of my program, which does not have Qt as a dependency
[13:55:44] <altendky> so the first part sounds like my attrs-written pyqtified classes that back my models
[13:55:51] <ali1234> yes
[13:56:05] <altendky> the second part sounds like... the same thing but without the pyqtify maybe
[13:56:26] <ali1234> i guess inherit from the CLI versions
[13:56:29] <altendky> i've been meaning to look at my stuff and see if it can (already, or with some change) be usable still entirely without qt
[13:56:50] <ali1234> and add Qt properties... but that doesn't really make sense
[13:57:09] <ali1234> the CLI version is just nested dicts pretty much, with a few attributes
[13:57:55] <ali1234> so i need to be able to add a non-Qt object to a python dict, and that causes a new item to appear in my list model
[13:58:16] <ali1234> these seems extremely complicated and also completely mundane at the same time
[13:58:28] <ali1234> but maybe i'm just looking at it wrong
[13:58:31] <altendky> dicts don't have hooks for that. but what is your non-qt list model? or is there now 'model' beyond the data in cli mode
[13:58:46] <ali1234> there is no model beyond the data
[13:58:57] <ali1234> well, not exactly true
[13:58:58] <altendky> and 'notifications'?
[13:59:00] <ali1234> i can show it to you
[13:59:25] <altendky> is there a reason it isn't just the various stuff we looked at yesterday either with or without the qt?
[13:59:29] <ali1234> https://github.com
[14:00:07] <ali1234> there is a heirarchy: Service contains Magazines, Magazines contain Pages, and Pages contain Subpages
[14:00:15] <ali1234> so those four classes make a tree
[14:00:16] <altendky> that's maybe an upside to my approach. the code of the class isn't 'infected' by qtness. just the decorator that could be conditionally applied. also my pyqtify was able to use either @property or @pyqtProperty
[14:00:30] <ali1234> that is actually a very good point
[14:00:35] <ali1234> i hadn't considered that yesterday
[14:00:50] <ali1234> you can just apply the decorator and what was previously just regular attributes become Qt properties
[14:01:25] <ali1234> still though, it can't turn my classes into models
[14:01:30] <ali1234> at least not automatically
[14:01:47] <ali1234> it can turn them into model items
[14:01:52] <ali1234> but that is kind of different
[14:02:58] <ali1234> i am almost certainly going to have to refactor the Service tree anyway, because i need to extend the way it works (including adding serialization)
[14:03:14] <altendky> or apply the decorator and tell it pyqtProperty when you want that and property when you want that. and in property mode you could still integrate some other ... hmm, i'm trying to remember what value was brought with it having properties. oh yeah, i was still applying limits to assignment and such
[14:03:17] <altendky> i think
[14:03:59] <altendky> maybe should be two decorators but. not a huge difference
[14:04:26] -!- frispete_ has joined #pyqt
[14:06:14] <ali1234> the simplest way i can explain what i am trying to do is....
[14:06:41] <ali1234> imagine you have a dict containing key: set
[14:06:58] <ali1234> and you want to make a gui that lets you drag and drop items between the sets
[14:07:14] <ali1234> in a tree view
[14:07:54] -!- cottoneyejim has quit [Ping timeout: 240 seconds]
[14:18:11] <altendky> ali1234: there's plenty of crap in this but my goal was to write attrs classes and have the data tree be serializable and viewable in a qt tree. https://github.com
[14:18:28] <altendky> (screenshot there, sample code coming)
[14:19:22] <altendky> the CommandVF at the top on the right is for example an instance of https://github.com
[14:20:19] <altendky> view pushes into the class instance, assigning to the class instance notifies the view. there's a generic qt model in the middle that provides that interfacing so the classes themselves just have the signal aspect
[14:21:09] <ali1234> huh
[14:21:21] <ali1234> that tool is exactly what i need on another part of this project
[14:21:30] <ali1234> like literally exactly
[14:21:45] <altendky> i don't share this because i think you should use the code but because i think you ... uh, was gonna say you wanted something similar. :]
[14:21:56] <altendky> so it's at least a reference that could probably be done much better in a second pass
[14:22:05] <ali1234> the thing i have previously been talking about today is not really very similar to this
[14:22:11] <altendky> sure
[14:22:16] <ali1234> but i have another thing which is literally identical
[14:22:33] <ali1234> how are parameters defined?
[14:22:36] <altendky> but it's still 'i want to just write classes, not qt boilerplate garbage that makes everything messy, but i still want to view via a qt view'
[14:22:52] <ali1234> yes, it probably shares some of that
[14:22:59] <ali1234> but i mean it is spooky
[14:23:21] <altendky> oh yeah, so https://github.com it actually uses a _nearly_ normal standard item model. just a little tweaking https://github.com
[14:23:52] <altendky> the parameters (not groups) on the left are https://github.com
[14:24:10] <ali1234> i actually didn't consider using a treeview on my other thing
[14:24:14] <altendky> this uses graham and i should switch to desert
[14:24:24] <altendky> well, tree or otherwise
[14:24:40] <altendky> also, the way that the tree is handled is (i think?) kinda garbage
[14:25:00] <altendky> it's a .children attribute and i'm wondering if putting the tree aspect outside the class might work out more cleanly
[14:26:23] <altendky> maybe even networkx or some dedicated existing graph thingy
[14:26:39] <altendky> (i think it doesn't totally work but having it not restricted to a tree would be nice)
[14:26:53] <ali1234> are you familiar with hardware registers and eg the memset tool which uses /dev/mem?
[14:27:35] <altendky> not in the linux sense but before qt i was an embedded c dev (like microcontrollers controlling cranes or forklifts embedded) so maybe
[14:28:04] <altendky> and both my main pyqt apps are for managing an embedded power converter including piles of interface code gen for it
[14:28:06] <ali1234> well, i mean, you know the pain of wanting to check a register, having to look it up in the datasheet, and then do peek <address>?
[14:28:26] <altendky> sure. manually reading a pdf is... silly
[14:28:37] <altendky> and you described the easy part. you also get to decode :]
[14:28:41] <ali1234> i was trying to make a tool that reads a yaml description of registers and dynamically builds a gui where you can view and edit them
[14:29:17] <ali1234> you just supply the yaml and peek/poke functions and it does the rest
[14:29:48] <ali1234> yaml describes the bit fields encoding
[14:30:22] <ali1234> i made the yaml loader and got to the part of making it dynamically build a Qt GUI, but it seems like you've done exactly that with PM
[14:30:28] <altendky> sure. in the sunspec area (not in the old screenshot) i've got some bitpacking for going into and out of the 16-bit registers
[14:31:09] <altendky> yeah, it's been just me coding it without any review and being told to pile features on top of mess rather than cleaning up and... so i hesitate to encourage using it.
[14:31:24] <altendky> but, it is still a reference that i can help pick through to see some approaches
[14:31:46] <altendky> and certainly a lot of it belongs out in a much more general and reusable library
[14:32:17] <ali1234> this is for the analog capture area of the teletext project. i want to tweak capture card pci registers :)
[14:33:35] <ali1234> the treeview thing today is right at the other end - editing the captured and deconvolved service
[14:37:54] <altendky> here's a smaller example model from the few tests i have https://github.com
[14:38:37] <altendky> might be more graspable how it fits together, maybe
[14:44:46] -!- cottoneyejim has joined #pyqt
[15:03:59] -!- logs has quit [Ping timeout: 272 seconds]
[15:05:10] -!- logs has joined #pyqt
[15:30:14] -!- bomex has joined #pyqt
[15:30:23] <bomex> hello
[15:45:04] -!- bomex has quit [Remote host closed the connection]
[15:55:37] -!- yustin has joined #pyqt
[16:34:33] -!- jpb has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
[17:04:01] -!- plutopotamus has quit [Read error: Connection reset by peer]
[17:11:48] -!- ali1234 has quit [Remote host closed the connection]
[17:12:56] -!- ali1234 has joined #pyqt
[17:53:50] -!- jmarsac has joined #pyqt
[17:57:13] -!- yustin has quit [Ping timeout: 264 seconds]
[18:00:14] -!- jmarsac has quit [Ping timeout: 240 seconds]
[18:05:56] -!- jmarsac has joined #pyqt
[18:12:05] -!- jmarsac has quit [Ping timeout: 272 seconds]
[18:15:40] -!- jmarsac has joined #pyqt
[18:36:47] -!- jmarsac has quit [Read error: Connection reset by peer]
[18:45:33] -!- BPL has quit [Quit: Leaving]
[20:36:59] -!- alexhugo has quit [Remote host closed the connection]
[20:37:16] -!- alexhugo has joined #pyqt
[20:41:58] -!- alexhugo has quit [Ping timeout: 260 seconds]
[21:01:09] -!- cottoneyejim has quit [Quit: cottoneyejim]
[21:20:23] -!- alexhugo has joined #pyqt
[21:38:32] -!- alexhugo has quit [Ping timeout: 256 seconds]
[22:34:46] -!- alexhugo has joined #pyqt
[22:36:09] -!- alexhugo has quit [Read error: Connection reset by peer]