#pyqt | Logs for 2018-11-12

Back
[00:58:43] -!- Belxjander has joined #pyqt
[01:01:54] -!- kallesbar has joined #pyqt
[01:06:56] -!- Bjander has joined #pyqt
[01:07:46] -!- Belxjander has quit [Ping timeout: 246 seconds]
[01:07:46] Bjander is now known as Belxjander
[03:48:42] -!- BPL has joined #pyqt
[03:53:29] -!- Lauxley has joined #pyqt
[05:15:59] -!- anqxyr has joined #pyqt
[06:10:47] -!- mintograde has joined #pyqt
[06:39:37] -!- frispete_ has quit [Quit: Konversation terminated!]
[06:41:45] -!- frispete has joined #pyqt
[07:00:03] -!- mintograde has quit [Ping timeout: 244 seconds]
[09:17:47] -!- Siecje has joined #pyqt
[10:36:37] -!- Lauxley has quit [Quit: Leaving]
[10:59:01] -!- swalladge has quit [Ping timeout: 252 seconds]
[11:00:34] -!- swalladge has joined #pyqt
[13:04:35] -!- kallesbar has quit [Quit: Konversation terminated!]
[13:16:11] -!- anqxyr has quit [Ping timeout: 244 seconds]
[13:27:59] -!- anqxyr has joined #pyqt
[13:36:42] -!- kushal has quit [Remote host closed the connection]
[13:37:05] -!- kushal has joined #pyqt
[14:34:12] -!- anqxyr has quit [Ping timeout: 244 seconds]
[14:35:18] -!- TunaLobster has joined #pyqt
[16:11:54] <altendky> is qtpy getting away with something by licensing MIT but referencing pyqt5? https://github.com i was just wondering how that works since the gpl is so infections but a big reason you might support both pyqt and pyside is license flexibility
[16:15:13] <The-Compiler> altendky: MIT is compatible with the GPL
[16:16:06] <altendky> The-Compiler: that sounds right... but... i could license my whole application as mit despite using gpl pyqt5?
[16:18:45] <altendky> The-Compiler: i think it goes the other way. i'm allowed to use mit code in a gpl application. i'm not allowed to use gpl in an mit application. https://www.gnu.org
[16:31:40] -!- mintograde has joined #pyqt
[16:53:13] -!- BPL has quit [Read error: Connection reset by peer]
[16:53:37] -!- BPL has joined #pyqt
[17:09:40] -!- TunaLobster has quit [Ping timeout: 264 seconds]
[17:10:00] -!- agile_prg has joined #pyqt
[17:10:34] <agile_prg> hi all, I need to make a curved gas gauge that has bars in it, I am pretty sure I need to use a paintevent, but not sure how to approach the rest
[17:10:43] <agile_prg> can anyone help me to get a good strategy?
[17:11:40] <altendky> agile_prg: i nabbed and updated qscale. see the image (most are flat so look straight, but technically curved). https://github.com
[17:11:51] <altendky> agile_prg: it does have code for drawing color bars in configurable ranges
[17:12:08] <altendky> not going to claim it's great code but it does work
[17:13:28] <agile_prg> well, can you help me to understand the general approach to approaching the solution to my problem?
[17:14:56] <altendky> agile_prg: draw things? I'm not sure what parts you do and don't understand. Or if I know what you want to do since you didn't clarify if the widget I shared looked relevant
[17:14:58] <Avaris> well, you override paintevent and then paint what you want... :). is there a particular step that you're confused?
[17:15:55] <agile_prg> well lets say there are bars in a curve, would I put those in a png where the bar inside is transparent and then draw a curve underneath the png to populate the bars?
[17:16:35] <Avaris> no png. you draw stuff with primitives. rect circle polygon etc
[17:16:51] <agile_prg> why wouldn't my approach work?
[17:17:28] <Avaris> first, it's a bitmap. it won't scale. make things bigger and it'll pixelate
[17:17:33] <Avaris> second, why?
[17:17:45] <agile_prg> what about a venctor?
[17:18:00] <agile_prg> well just seems easier to me
[17:18:29] <Avaris> so a vector? like svg? that draws using rect circles polygons? sounds familiar, hmm...
[17:18:49] <altendky> agile_prg: you can svg. But you know that and worked with it already for a few years
[17:18:53] <agile_prg> well an svg with some transparent areas that I can draw underneath of
[17:19:27] <Avaris> what i'm trying to say is, in qt you draw same as you'd do in svg. so why the middle man?
[17:19:27] <agile_prg> just trying to see what the best approach is
[17:20:03] <altendky> Avaris: except you can't qt draw in inkscape for static stuff
[17:20:17] <altendky> agile_prg: I still don't actually know what you want to achieve
[17:20:44] <Avaris> sure, prototype in inkscape and port over. it's straightforward
[17:21:01] <agile_prg> well imagine a gas gauge with bars representing how full it is, if all bars are colored, it has a full gas tank
[17:21:03] <altendky> What sort of bars? Curved? Colors? What parts change?
[17:21:28] <agile_prg> well a square, then a black square, then a square, then a black square
[17:21:32] <altendky> agile_prg: so a bunch of segments that are on or off?
[17:21:35] <agile_prg> only the non-black squares have colors
[17:21:51] <agile_prg> they are partially on or off, they could be 10% full
[17:21:52] <Avaris> kinda like battery monitor?
[17:21:55] <agile_prg> yes
[17:22:02] <agile_prg> exactly
[17:22:19] <agile_prg> but it is curved
[17:22:22] <altendky> agile_prg: I've got an LED widget based on an svg that modified colors in the svg file. It's a bit silly but...
[17:22:24] <Avaris> heh, use a progressbar and rotate 90 degrees ;)
[17:23:42] <agile_prg> well a progress bar is not curved is it?
[17:24:54] <altendky> agile_prg: you can svg or not. There will be benefits both ways. I have examples related to both
[17:25:41] <Avaris> i was half joking
[17:25:44] <altendky> My color bars in the qscale are curved...
[17:26:34] <Avaris> by curved you mean the overall outline, right? not the individual bars inside?
[17:26:36] <agile_prg> I did not see a picture of that
[17:26:58] <agile_prg> the bars are curved too
[17:27:15] <altendky> agile_prg: yup
[17:27:16] <Avaris> ok, i might need a sketch to understand then
[17:28:26] <agile_prg> https://www.linux-apps.com
[17:28:33] <agile_prg> go to #15
[17:28:44] <agile_prg> the second picture in shows a curved bar progress bar
[17:29:04] <Avaris> oh... that kind of curved.
[17:29:09] <agile_prg> it says 70 in the middle of it
[17:29:44] <altendky> agile_prg: looks like you've got another example
[17:30:06] <agile_prg> well, the link cannot be found
[17:30:18] <agile_prg> is there a better way to describe what I am trying to do that google would be more friendly to?
[17:30:56] <agile_prg> brb
[17:31:57] <Avaris> click dowload, you get the code that draws it. it's c++ but pretty easy to port
[17:32:30] <altendky> agile_prg: https://github.com
[17:37:49] <altendky> https://usercontent.irccloud-cdn.com
[17:38:32] <altendky> That's the last one. It's a container as well so you can nest. Text inside yellow inside green.
[17:41:52] <altendky> agile_prg: even if not what you want it's relatively simple compared to the other paint code so could be easier to look at first
[17:45:26] <agile_prg> ok thanks all, altendky did you use an svg just curious?
[17:46:13] <altendky> agile_prg: as I said, I used an svg in my led widget. It modified the svg to change the color
[17:46:45] <altendky> agile_prg: you could probably afford to look at the code I've shared. We're up to the widgets.
[17:46:56] <agile_prg> ok
[17:46:57] -!- Siecje has quit [Quit: Leaving.]
[17:54:28] <agile_prg> Avaris looking at the download you led me to, it has a circular bar field
[18:26:27] -!- BPL has quit [Ping timeout: 240 seconds]
[21:34:46] -!- mintograde has quit [Ping timeout: 244 seconds]