#pyqt | Logs for 2019-04-19
Back
[02:31:18] -!- mandeep_ has quit [Ping timeout: 244 seconds]
[05:53:51] -!- cottoney1 has joined #pyqt
[05:59:10] -!- BPL has joined #pyqt
[05:59:20] -!- saraf has joined #pyqt
[10:42:32] -!- frispete has quit [Ping timeout: 268 seconds]
[10:46:36] -!- frispete has joined #pyqt
[10:52:37] -!- Thaodan has quit [Quit: ZNC - https://znc.in]
[10:53:37] -!- Thaodan has joined #pyqt
[10:57:48] -!- Thaodan has quit [Read error: Connection reset by peer]
[10:59:14] -!- Thaodan has joined #pyqt
[11:11:38] -!- agile_prg has joined #pyqt
[11:14:39] <agile_prg> does anyone here use qt designer on a different platform then the target platform such as embedded?
[11:15:34] <altendky> I did an embedded Linux from desktop Linux
[11:21:14] <altendky> and desktop windows dev'ed in desktop linux
[11:22:25] <Avaris> qt designer? target platform?
[11:22:26] <agile_prg> well how did you handle the font size to be right on both platforms through qt designer?
[11:22:44] <agile_prg> if displays have different dpi's the font will show differently
[11:23:04] <altendky> i might have forced it in my application, lemme see if i can find it
[11:23:42] -!- saraf has quit [Read error: Connection reset by peer]
[11:23:45] <altendky> i think this is the branch https://github.com
[11:24:43] <altendky> though i run '100%' anyways. and i'm not sure how you'd get it exactly right in designer. in the application itself you could force whatever scaling you want i think
[11:25:10] -!- frispete has quit [Ping timeout: 268 seconds]
[11:25:13] <agile_prg> my other problem is I have a qlabel with an initial value I put in qt designer, then I do a show on the .ui but I change the qlabel value in the contructor, yet I see the qt designer value for an instant then the new value
[11:25:38] <altendky> share code for that one
[11:25:39] <agile_prg> its like the .ui widget is not finished updating before it is shown
[11:26:05] <agile_prg> is there a way to gaurantee the .ui is finished updating before showing?
[11:26:33] <altendky> i'd start by looking at your code
[11:26:54] <Avaris> are you sure you're updating it before showing?
[11:27:27] <agile_prg> well, its pretty simple, in qt designer make a qlabel and put in default value, then in the contructor put ui->lblName->setText("new value")
[11:27:50] <agile_prg> I see default value for an instant then new value
[11:27:54] <agile_prg> when I run the program
[11:27:57] <altendky> settings > preferences > embedded design > device dpi
[11:28:16] <agile_prg> altendky is that in qt designer?
[11:28:17] <altendky> agile_prg: what is 'the constructor'. share your code
[11:28:19] <altendky> it is
[11:28:24] <agile_prg> wow cool
[11:30:16] <agile_prg> well I am in c++ land
[11:30:20] <agile_prg> forgive me
[11:30:35] <altendky> i didn't mean 'constructor is not a python term'
[11:31:18] <altendky> i meant that it's usually quickest to debug code you can see, not code you can't
[11:34:04] <agile_prg> ok, I had a radical idea, if I set a monitor to use the same pixels and dpi as my target system and I ran qt designer on that monitor I could gaurantee what I am seeing in qt designer will look the same on the embedded display right?
[11:34:26] <altendky> or, use it's own feature that seems to be intended to cover your needs?
[11:35:09] <altendky> but i wouldn't plan on pixel for pixel perfect in designer vs. target
[11:35:25] <agile_prg> why not?
[11:35:32] <altendky> because there's a _lot_ going on
[11:35:48] <altendky> i just assume there's something with fonts etc that might be a bit different.
[11:36:09] <altendky> close, useful, good, sure. i just wouldn't be surprised when something was a tad different
[11:46:23] -!- frispete has joined #pyqt
[12:24:16] -!- Belxjander has quit [Ping timeout: 250 seconds]
[12:26:06] -!- Belxjander has joined #pyqt
[12:26:06] -!- Belxjander has quit [Excess Flood]
[12:27:55] <agile_prg> I am sooooo dumb
[12:28:23] <agile_prg> I was not altering the qlabel in the constructor but waiting for a signal to update it which was slightly delayed showing the flicker effect
[12:28:38] <agile_prg> please excuse how dumb I am
[12:28:56] <altendky> it's easier to debug actual code than to debug claims made in english :]
[12:29:35] <altendky> fwiw i just realized i had SunSpec in one place and Sunspec in another and that was my issue for the past few hours :[ (and then some)
[12:30:07] -!- Belxjander has joined #pyqt
[12:30:31] <agile_prg> LOL
[12:30:37] <agile_prg> what is Sunspec?
[12:30:58] <altendky> communication standard and more for solar industry
[12:31:05] -!- Belxjander has quit [Excess Flood]
[12:31:17] <agile_prg> but was that in your code?
[12:31:30] <altendky> yes, entirely my mistake. nothing else to blame
[12:31:55] <agile_prg> well I am more embarassed with mine, mine should have been f'ing obvious
[12:32:23] * agile_prg hits himself in the head, get smarter you damn brain!!!!!!!!!
[12:34:12] -!- Belxjander has joined #pyqt
[12:34:38] -!- mandeep_ has joined #pyqt
[12:40:01] -!- mandeep_ has quit [Remote host closed the connection]
[12:40:12] -!- mandeep has joined #pyqt
[12:43:19] -!- Belxjander has quit [Read error: No route to host]
[12:58:03] -!- Belxjander has joined #pyqt
[13:06:25] -!- Belxjander has quit [Ping timeout: 246 seconds]
[13:07:58] -!- Belxjander has joined #pyqt
[13:17:37] -!- Belxjander has quit [Ping timeout: 246 seconds]
[14:14:26] -!- Belxjander has joined #pyqt
[14:18:44] -!- Belxjander has quit [Ping timeout: 246 seconds]
[14:26:34] -!- frispete has quit [Ping timeout: 246 seconds]
[14:27:56] -!- frispete has joined #pyqt
[14:28:21] -!- mandeep has quit [Ping timeout: 255 seconds]
[14:30:31] -!- Belxjander has joined #pyqt
[14:34:32] -!- Belxjander has quit [Excess Flood]
[14:42:51] -!- kallesbar_ has joined #pyqt
[14:45:27] -!- kallesbar has quit [Ping timeout: 255 seconds]
[14:54:44] -!- Belxjander has joined #pyqt
[14:55:40] -!- Belxjander has quit [Excess Flood]
[15:03:17] -!- mandeep has joined #pyqt
[15:03:18] -!- mandeep has quit [Remote host closed the connection]
[15:03:32] -!- mandeep has joined #pyqt
[15:04:53] -!- Belxjander has joined #pyqt
[15:04:53] -!- Belxjander has quit [Excess Flood]
[15:12:50] -!- Belxjander has joined #pyqt
[15:12:50] -!- Belxjander has quit [Excess Flood]
[15:22:44] -!- mandeep has quit [Remote host closed the connection]
[15:39:28] -!- Belxjander has joined #pyqt
[15:39:28] -!- Belxjander has quit [Excess Flood]
[16:44:01] -!- mintograde has joined #pyqt
[17:22:36] -!- mandeep has joined #pyqt
[17:34:56] -!- kallesbar_ has quit [Quit: Konversation terminated!]
[18:39:59] -!- cottoney1 has quit [Quit: cottoney1]
[19:18:27] -!- Belxjander has joined #pyqt
[19:19:52] -!- mandeep has quit [Ping timeout: 246 seconds]
[19:23:55] -!- BPL has quit [Quit: Leaving]
[20:28:57] -!- mandeep has joined #pyqt
[21:43:22] -!- mintograde has quit [Ping timeout: 246 seconds]
[22:00:11] -!- grateful has joined #pyqt
[22:03:53] <grateful> https://pastebin.com
[22:05:04] <grateful> i'm working on this and wondering how i can place proccess and quit in the bottom, i'll also have three i believe lables? need to create a filebrowser to load 3 files
[22:05:21] <grateful> https://pythonspot.com
[22:05:23] <grateful> looking at this
[22:06:21] <altendky> grateful: can you show a drawing of what you want? fyi sounds like https://doc.qt.io might be relevant at some point
[22:06:35] <altendky> and i truly didn't mean to push you out of #python either :]
[22:07:16] <grateful> nah i just plan to learn more pyqt right now too so figured join specific chan makes sense
[22:07:32] <grateful> easier to ask questions in here and leave
[22:07:35] <grateful> and come back and see them
[22:07:58] <grateful> let me draw it up
[22:08:48] <altendky> i personally use designer for my 'static' layout. then if there's dynamic i add it in while executing
[22:11:53] <grateful> i kinda stumlbed onto this
[22:11:54] <grateful> https://stackoverflow.com
[22:12:02] <grateful> been looking at it cause i kinda like it's layout
[22:12:16] <grateful> and i'd like to add a process bar too
[22:12:18] <grateful> :)
[22:13:07] <grateful> basically looking for that but
[22:13:26] <grateful> file1 | progress bar area
[22:13:31] <grateful> file2 |
[22:13:34] <grateful> file3 |
[22:13:59] <altendky> so file names on the left and progress bar on the right?
[22:14:02] <grateful> [submit][quit] below the 3 file labels
[22:14:06] <grateful> yeah
[22:14:16] <altendky> should the files be in a list box?
[22:15:18] <grateful> textbox is fine for now, to input "home/yada/here"
[22:15:36] <grateful> but ideally like to find an example to "browser for a file location"
[22:15:56] <grateful> pyqt5 file dialog
[22:17:01] <grateful> basically i've written code that compares data from 2 excel sheets and 1 pdf, and creates a new excel with pivot tables :)
[22:17:21] <grateful> but got tired of opening up my code to change file locations :)
[22:17:55] <altendky> https://doc.qt.io
[22:18:02] <grateful> so figured might aswell learn something, was looking at wxpython but this is nice
[22:18:04] <altendky> sure
[22:18:22] <altendky> i mean i'd be lazy and do a cli if i didn't need a gui for someone else
[22:19:01] <altendky> but sure, three line edits, a button next to each with text '...' that triggers a file dialog
[22:19:07] <grateful> well thats the 2nd part, in the event im on vacation or sick i'd want my boss to be able to get the report too
[22:19:55] <altendky> alrighty. so not that it's necessarily 'best' but i'd do a gridlayout. put the line edits in the grid directly. if/when you have buttons, them too. then figure out where you want the progress but don't put it directly into the grid
[22:20:17] <altendky> well, at least not without a span
[22:20:22] <grateful> hmm
[22:20:26] <grateful> k
[22:20:27] <altendky> if you do, then it might force the size of one of the line edits to get tweaked
[22:20:47] <altendky> so, depending you either put it in then span it over all three line edit rows
[22:21:09] <altendky> or, you put in a vertical box layout, span that, and put the progress into that (with spacers to push it down or up or whatever
[22:21:16] <altendky> or is it stretches
[22:21:59] <altendky> and maybe an hbox layout in a fourth row, spanning all columns, for buttons. or just a dialog button box that spans
[22:22:11] <altendky> depending. well, yeah, probably not the dialog button box here i guess
[22:26:13] <grateful> i'll play for a bit with it, :)
[22:40:38] -!- Tom_dev has joined #pyqt
[22:48:06] -!- Tom_dev has quit [Quit: Leaving]
[23:21:04] <grateful> can i use an icon instead of ... ?
[23:21:16] <altendky> i think
[23:21:32] <altendky> qt has some standard icons you pick by name and it tries to pick the proper one for the system you are on
[23:22:09] <grateful> k
[23:22:17] <grateful> ill do ... for now and then loook at that
[23:23:02] <altendky> i don't know but https://doc.qt.io might make more sense at that point
[23:23:45] <grateful> yeah i think so
[23:26:01] <grateful> https://pastebin.com
[23:26:06] <grateful> this is where i am right now :)
[23:26:37] <grateful> need to add a textbox next to those buttons that populates
[23:26:47] <grateful> from the filedialog
[23:26:52] <grateful> but i'm struggling
[23:29:14] <altendky> side note, `QWidget.__init__(self)` -> `super().__init__()` (and maybe pass through a parent parameter even if you default it to None)
[23:30:06] <altendky> and for py3, app.exec() is fine without an _
[23:30:41] <altendky> i do notice you aren't storing any of the widgets to self which can cause problems. basically the c++ instance might stick around but the python instance can disappear
[23:30:47] <altendky> but what exactly is the issue?
[23:31:49] <grateful> i don't fully grasp layout tbh
[23:31:52] <altendky> presumably you want either a form layout or a grid not the vbox
[23:32:00] <altendky> because you want a button next to each line edit, yeah?
[23:32:05] <grateful> yeah
[23:32:21] <grateful> can you kindly show me in my code how that might look? :)
[23:32:23] <altendky> well, you have buttons now but no labels or line eidts?
[23:32:41] <altendky> instead of the vbox on line 17 you create a grid
[23:32:54] <altendky> then when you add to it you specify the row and column to put the widget in
[23:33:06] <grateful> before i added line edits or icons i wanted to grasp layout
[23:33:38] <altendky> sure, and the thing to grasp here is that a vbox won't get you a good grid of widgets, it'll get you a vertical 'list' of them
[23:33:48] <altendky> vbox is vertical box
[23:33:51] <grateful> oh
[23:33:53] <grateful> well that makes sense
[23:34:55] <altendky> i mean you could put three hboxes in the vbox and then an edit and button in each hbox. and it'd probably happen to line up because all the widgets are the same. but, it wouldn't be explicitly forcing alignment. technically the button on each row and the edit could be different widths (so far as the layouts are concerned)
[23:35:01] <altendky> using a grid actually creates a grid
[23:35:42] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[23:36:42] <grateful> so technically i could keep it for the progress bar section
[23:37:45] <grateful> or i should redo entire thing to grid?
[23:38:17] -!- Belxjander has joined #pyqt
[23:39:07] <altendky> I would do the latter. But you could have an outer hbox with a grid inside for the left part
[23:39:58] -!- kallesbar has joined #pyqt
[23:42:25] <altendky> Or maybe a form for the left. I don't use them but maybe it'd be more proper.