#pyqt | Logs for 2019-01-16

Back
[02:26:42] -!- BPL has joined #pyqt
[02:36:14] -!- anqxyr has joined #pyqt
[03:01:12] -!- kallesbar has joined #pyqt
[03:12:56] -!- shakraw has joined #pyqt
[05:37:27] -!- shakraw has quit [Ping timeout: 268 seconds]
[05:40:21] -!- anqxyr has quit [Read error: Connection reset by peer]
[05:53:42] -!- shakraw has joined #pyqt
[06:11:56] -!- shakraw has quit [Ping timeout: 246 seconds]
[06:13:18] -!- shakraw has joined #pyqt
[06:39:40] -!- thomasross has quit [Remote host closed the connection]
[06:47:56] -!- thomasross has joined #pyqt
[06:50:04] -!- thomasross_ has joined #pyqt
[06:50:04] -!- thomasross has quit [Killed (leguin.freenode.net (Nickname regained by services))]
[06:50:04] thomasross_ is now known as thomasross
[06:52:04] -!- Belxjander has quit [Ping timeout: 268 seconds]
[06:53:40] -!- Belxjander has joined #pyqt
[10:36:32] -!- thomasross has quit [Ping timeout: 268 seconds]
[11:05:56] -!- AbleBacon has joined #pyqt
[11:28:49] -!- anqxyr has joined #pyqt
[11:47:02] -!- Siecje has joined #pyqt
[11:47:13] -!- Siecje has parted #pyqt
[12:11:13] -!- Siecje has joined #pyqt
[12:22:36] -!- anqxyr has quit [Read error: Connection reset by peer]
[12:30:41] -!- Siecje has parted #pyqt
[12:35:55] -!- littlekitty has joined #pyqt
[12:37:17] -!- kallesbar has quit [Quit: Konversation terminated!]
[13:42:12] -!- shakraw has quit [Quit: This computer has gone to sleep]
[13:52:26] -!- mandeep has quit [Remote host closed the connection]
[14:09:20] -!- mandeep has joined #pyqt
[14:29:27] -!- shakraw has joined #pyqt
[15:26:43] -!- shakraw has quit [Quit: This computer has gone to sleep]
[16:04:05] -!- mintograde has joined #pyqt
[16:14:32] -!- necrose99 has joined #pyqt
[16:34:16] -!- thomasross has joined #pyqt
[16:45:28] -!- littlekitty has quit [Quit: Connection closed for inactivity]
[16:48:53] -!- agile_prg has joined #pyqt
[16:49:19] <agile_prg> altendky you around, can you tell me the approach your taking to create a windows exe and package it into an installer?
[16:50:31] <altendky> agile_prg: pyinstaller and qtifw. github.com/altendky/st is the only project i actually make an installer for. a few others get pyinstallered though
[16:50:52] <agile_prg> sweet thanks!
[16:51:02] <The-Compiler> I use PyInstaller and NSIS FWIW
[16:52:09] <altendky> agile_prg: i do like entry_points so i would now use the entry_point thing for pyinstaller from the wiki https://github.com
[16:52:13] <altendky> st doesn't though i'm pretty sure
[16:52:36] <altendky> i tried nsis and got fed up with seemingly having to make every page myself. but i suspect that was me not knowing nsis at all
[16:52:49] <altendky> not that i particularly 'like' qt ifw.
[16:53:03] <altendky> but i don't have to touch it much so, whatever
[16:53:03] <agile_prg> I am confused about the difference between pyinstaller and qtifw
[16:53:16] <altendky> agile_prg: pyinstaller, despite it's name, doesn't make an installer
[16:53:30] <agile_prg> ok just curious
[16:53:34] <agile_prg> ya I know nsis well
[16:53:49] <altendky> agile_prg: it packages a copy of python with your code and dependencies and some os distribution dependencies and makes an executable
[16:54:00] <altendky> agile_prg: qt ifw is qt's nsis. Qt Installer FrameWork
[16:54:20] <agile_prg> very cool, I remember using it but not the details, brushing away the cobwebs :>
[16:54:48] <altendky> the installer handles taking the files pyinstaller made/grouped and actually shoving them into the target system wherever they go, adding desktop and start menu shortcuts, an uninstaller, etc
[16:55:05] <The-Compiler> Yeah, can't say I'm too happy with NSIS, it's a weird language and it feels like reinventing the wheel sometimes
[16:55:06] <altendky> pyinstaller should probably be pypackager or somesuch
[16:56:15] <agile_prg> I wish I knew of an installer that could automatically upgrade the program
[16:57:18] <altendky> qt ifw can upgrade via a web repository and the maintenance tool. there might be qt library features for that too, i dunno. otherwise yeah, dealing with subprocessing
[16:58:16] <altendky> it is amazing that you can't download a qt ifw installer and use it to upgrade an existing install. you have to uninstall the old then install the new.
[16:58:34] <agile_prg> yup that is a little bit irritating
[16:58:36] <altendky> there's a ticket for that iirc
[16:58:48] <altendky> that may even be why i tried nsis
[16:58:53] <agile_prg> pyinstaller built the exe but says it can't find python37.dll
[17:00:22] <altendky> agile_prg: i have to head out in 15 minutes. unless The-Compiler wants to take this, maybe go to #python with full code and output
[17:00:40] <altendky> i do generally do pyinstaller in a venv/virtualenv
[17:00:43] <agile_prg> thanks man, I will work on it for a while
[17:06:02] <agile_prg> got it to run! :>
[17:39:20] -!- mandeep has quit [Remote host closed the connection]
[18:14:43] -!- necrose99 has quit [Ping timeout: 268 seconds]
[19:04:33] -!- mandeep has joined #pyqt
[19:38:50] -!- AbleBacon has quit [Quit: Leaving]
[19:50:14] -!- headrx has joined #pyqt
[19:50:22] <headrx> Hey guys, how are ya
[19:51:35] <altendky> headrx: saw your code, what is happening and what isn't?
[19:53:37] <headrx> altendky: it shows the mainwindow, it shows the menu, but no tabs from the 'Rack_Display'
[19:55:00] <altendky> headrx: __init__
[19:55:08] <altendky> You are missing the second __
[19:56:07] <headrx> altendky: Geez.
[19:56:14] <headrx> altendky: Maybe a break is in order ? Lol
[19:56:19] <headrx> altendky: Thanks !!
[19:57:08] <altendky> I'd also suggest that your main window isn't an application (that name means something in qt). Consistently zero are super. And I don't like widgets that show themselves. It's kind of like big constructors that do too much. You lose flexibility
[19:58:13] <headrx> altendky: What do ya mean by consistently zero are super ?
[19:58:49] <altendky> headrx: you had super(QWidget, self) in one spot
[19:59:22] <headrx> I just mean i dont know what you mean by zero are super
[19:59:23] <altendky> Two arg super (sorry, I see the typo now)
[19:59:41] <altendky> headrx: arg not are :[
[19:59:47] <altendky> Argument
[20:00:00] <headrx> altendky: are you saying that super should only have one arg ?
[20:01:01] <altendky> headrx: it should have zero args. Passing arguments to super I'd only a thing to do in py2 where you are required to do it
[20:01:13] <headrx> gotcha
[20:01:15] <altendky> Also, you pass the class you are _in_, not the parent class
[20:05:37] -!- headrx has quit [Ping timeout: 256 seconds]
[20:05:59] -!- jef has quit [Ping timeout: 245 seconds]
[20:17:51] -!- headrx has joined #pyqt
[20:18:49] <headrx> altendky: do you have any advice or know of resources for the correct construction / flow of GUI building ?
[20:19:20] <headrx> I mean, make a main window, populate with widgets.. do layout with QVBoxLayout
[20:19:47] <headrx> But in terms of what should be controlling the spawning new widgets and what should be handling what?
[20:20:28] <altendky> headrx: I use designer for the GUI. I try to do as much of the logic as I can without GUI code
[20:20:54] <altendky> Easier testing and such
[20:23:01] <altendky> headrx: iirc you were starting with a file manager? But I don't remember if I got an answer about what the 'real'program was going to be
[20:27:29] <headrx> So its for a friend that owns some gas stations... his employees have a hard time putting the right amount of food in the hot rack at the right times.. so this will store the values of the food he has, the amount of them at what point throughout thte day
[20:30:15] <headrx> altendky: so ya, basically a file manager
[20:35:51] <altendky> headrx: I'm not sure how a file manager is the same
[20:36:16] <altendky> headrx: you are looking to store a log of the stock history?
[20:37:14] -!- ysangkok has parted #pyqt
[20:39:33] <headrx> altendky: Every day the employees make food for the hot rack.. pizza and whatnot.. and they have a hard time figuring out how much they need to have at certain time of the day, so they dont make to much and ab unch of waste... so this will give an 'admin' the ability to add food items.. and itll store that. Then utilizing those items, will make profiles. 'Monday' profile will hold the food objects for that day, each food having a dictio
[20:39:43] <headrx> or midnight through midnight
[20:40:10] <headrx> so each hour representation will hold how many pieces of said food item should be present in the hot rack
[20:40:24] <headrx> so they dont have like 30 slices of pizza at like 4 am or something
[20:41:09] <headrx> so then the admin would save that day, and the main program will just display the food items, and a 6 hour window of time, displaying how much they need of each at those times
[21:23:38] -!- Belxjander has quit [Ping timeout: 250 seconds]
[21:23:52] <altendky> headrx: no recording sales etc? I have to admit that the solution in my head is a piece of paper
[21:26:09] <headrx> altendky: LOL. I hear ya. Honestly, it was just something he tossed around a while back, thought it would be a good little project to get my feet wet on gui . Im going to store the files on a google-drive, that way he can manipulate the data remotely. Also, implementing a 'waste' system, so every shit they can keep track of what they are wasting
[21:27:03] <headrx> altendky: Total overkill. But its fun, and im learning a ton. Ive never built a gui , so this is like reading russian somtimes
[21:27:30] <altendky> Alrighty :]
[21:34:01] -!- headrx has quit [Ping timeout: 256 seconds]
[22:24:38] -!- LoneElf has joined #pyqt
[22:34:02] <LoneElf> Hey guys! I have a quandry! https://pastebin.com For some reason when I create an QApplication and call exec_() from within my run() method of my class, everything works. But when I make the calls at the beginning and end of main(), my application does not seen to work. Particularly my QTimers don't fire. What am I missing here? It must be something fundamental and stupid.
[22:37:40] <LoneElf> Ohhh. Perhaps the timer get destroyed when it goes out of scope!
[22:38:40] <altendky> LoneElf: `timer` in `runs()` won't go out of scope until the app exits
[22:38:59] <altendky> but qt+threading+multiprocessing... phew
[22:40:03] <altendky> LoneElf: it looks like you may want try/finally in a few places
[22:41:01] <LoneElf> Awesome. Yeah, I was able to figure out the problem.
[22:41:10] <altendky> LoneElf: you shared the working code?
[22:41:21] <LoneElf> altendky, Where might I want to put try/finally?
[22:42:26] <LoneElf> altendky, Yeah, I shared the working code. The code breaks when I comment out the first and final lines in run, and uncomment the same calls in main(). The problem was due to my timer getting destroyed when it went out of scope it seems (only happens when you comment out the first and final lines).
[22:42:40] <LoneElf> I should have pasted the broken code, sorry for the confusion.
[22:43:19] <altendky> LoneElf: excepts on lines 124 and 136 would probably be better as finally
[22:43:40] <altendky> LoneElf: though doing stuff outside your click.command like that seems a bit odd
[22:44:04] <altendky> LoneElf: be wary, i'm not actually sure if 138 will run when click exits. i forget
[22:44:25] <LoneElf> Ah, gotcha.
[23:15:39] -!- mintograde has quit [Ping timeout: 268 seconds]
[23:27:52] -!- LoneElf has quit [Quit: Leaving]