#pyqt | Logs for 2019-02-28
Back
[03:53:38] -!- n1` has joined #pyqt
[04:33:36] -!- Lauxley has joined #pyqt
[05:22:19] -!- BPL has joined #pyqt
[07:24:27] -!- BPL has quit [Read error: Connection reset by peer]
[08:36:40] -!- TechSmurf has quit [Ping timeout: 264 seconds]
[09:21:02] -!- n1` has quit [Ping timeout: 258 seconds]
[09:35:59] -!- n1` has joined #pyqt
[09:41:33] -!- Siecje has joined #pyqt
[10:40:02] -!- AbleBacon has joined #pyqt
[11:09:31] -!- n1` has quit [Ping timeout: 258 seconds]
[11:23:24] -!- Lauxley has quit [Remote host closed the connection]
[12:59:05] -!- kushal has quit [Remote host closed the connection]
[12:59:23] -!- kushal has joined #pyqt
[14:50:43] -!- kdas_ has joined #pyqt
[14:54:07] -!- kushal has quit [Ping timeout: 256 seconds]
[15:19:11] -!- n1` has joined #pyqt
[15:22:49] -!- n1` has quit [Client Quit]
[15:23:11] -!- n1` has joined #pyqt
[17:22:57] -!- n1` has quit [Ping timeout: 245 seconds]
[17:25:20] -!- mintograde has joined #pyqt
[17:38:54] -!- BPL has joined #pyqt
[18:15:15] -!- Siecje has parted #pyqt
[18:37:57] -!- AbleBacon has quit [Quit: Leaving]
[18:53:36] -!- TechSmurf has joined #pyqt
[19:19:14] -!- BPL has quit [Quit: Leaving]
[20:01:07] -!- mintograde has quit [Ping timeout: 246 seconds]
[20:23:39] -!- stee has joined #pyqt
[20:25:04] <stee> Hello. I installed PyQt5 using pip and noticed that 'python3.7/site-packages/PyQt5/Qt/plugins/sqldrivers' does not contain the driver for ODBC
[20:27:33] <stee> How can I build it from the Qt sources? The latest PyQt5 is 5.12 which I believe includes Qt 5.12.0
[20:28:32] <stee> So I have the 5.12.0 source and can build against my Linux system's Qt5
[20:28:55] <altendky> stee: there are instructions on the pyqt site. You really want to use qt for db instead of python options?
[20:29:21] <stee> hmm, I can go either way
[20:29:34] <stee> Is using python preferred?
[20:29:54] <stee> I would lose QSqlTableModel
[20:36:52] <stee> preferred -> recommended
[21:04:41] <altendky> stee: good point about the model. i haven't done python or qt db stuff personally. in general i tend towards non-qt libraries when i'm not losing integration.
[21:05:11] <altendky> stee: but, pointing out the model aspect reminded me that people had been in here in the past, i dunno, year or so and used that i thought. maybe double check some recent releases
[21:06:04] <altendky> stee: or, maybe the odbc driver isn't the only way to use the model, i don't even know... sorry
[21:17:50] -!- storgance has joined #pyqt
[21:19:33] <storgance> altendky: It appears as though your Delegate is drawing the object in reference to the root of the application, which is causing it to break if I use it in a non-zero-column. https://pastebin.com
[21:20:30] <storgance> Either that, or for some reason my grid is ending up with overlapping columns
[21:21:56] <altendky> storgance: that is a layer i hadn't tested, lemme try
[21:22:44] <altendky> storgance: i don't think they'll fix this but i did have an update after that https://github.com
[21:22:50] <altendky> no more loop
[21:24:11] <altendky> storgance: if you are going to set foreground colors, you need to set background colors too :]
[21:24:25] <altendky> https://usercontent.irccloud-cdn.com
[21:24:47] <storgance> Oh dang, didn't expect that to be left up to the system
[21:24:53] <storgance> Will keep that in mind.
[21:25:40] <altendky> storgance: so you are referring not to another column in the list view (aka, table view) but rather to the second widget on the right hand side?
[21:26:35] <altendky> is the different import style really necessary?
[21:26:42] <storgance> Oh wow
[21:26:52] <storgance> the updated delegate did fix the issue
[21:27:02] <altendky> cool :]
[21:27:33] <altendky> so it did
[21:27:43] <storgance> I have a Grid within a Grid by having the nested grid inside a widget
[21:27:44] <altendky> though it still leaves the question of a table view open. might still find a bug there
[21:28:04] <altendky> storgance: right, i thought you meant a second column within the view though. like a QTableView could have. that's all
[21:28:27] <altendky> storgance: but, that could be one grid with the left column spanning two rows
[21:28:33] <storgance> Okay, thank you for that haha. Fixed it before I could even ask
[21:28:58] <altendky> storgance: you might want to subscribe to that issue or such in case i make more changes
[21:29:01] <storgance> That grid is within the custom widget and spans two rows on purpose
[21:29:06] <storgance> Good idea
[21:29:44] <altendky> storgance: ok. but i'm saying that layout you have can be done with a single grid. two columns and two rows. left column with the QListView spanning two rows
[21:30:11] <altendky> (talking about the window layout, not the per-list-element layout
[21:30:15] <storgance> I...suppose. I did what I did for the conceptualization, but you're right, it really could and probably should be done like that
[21:32:38] <altendky> storgance: sure. you may want to organize differently. just wanted to make sure you saw it could happen that way. all depends
[21:33:11] <altendky> storgance: at some point i'll actually get around to having a library rather than just issues...
[21:47:48] <storgance> Starring is the same as subscribing, right?
[21:48:20] <altendky> there's a subscribe button on the right
[21:48:27] <altendky> the star in the upper right is for the repo
[21:48:43] <altendky> and i don't know if starring notifies, i think watch does that
[21:51:26] <storgance> If I'm being honest, I don't see subscribe or watch
[21:51:40] <altendky> storgance: are you logged in?
[21:52:04] <altendky> https://usercontent.irccloud-cdn.com
[21:52:14] <altendky> bottom right of the screenshot has the unsubscribe button
[21:54:27] <storgance> Oh there we go, I was on the wrong page. thank you
[22:13:39] <storgance> altendky: Other than word wrap, how do I force text to wrap? If someone puts in the equivalent of 'a'*100, for example, it makes it scrolled for the one word.
[22:15:12] <altendky> storgance: i don't know. maybe check with #qt (and let me know if there's an answer)
[22:15:21] <storgance> Okay!
[22:30:05] <storgance> No response yet...attempts to play around with the text formatting have also not worked. Have to go configure some computers rq.
[23:14:50] <storgance> altendky: I have gotten one response from someone named thiago, stating: you can use QFontMetrics to figuere out what text fits into what space or not...QTextBoundaryFinder to find boundaries where to break
[23:15:12] <storgance> though, considering I do not want to modify the text, I cannot accept that
[23:15:27] <altendky> storgance: wait, you want to wrap the text without modifying?
[23:15:35] <altendky> you'll have to put a line break somewhere
[23:15:50] <altendky> and yes, thiago is a standard name around qt
[23:16:07] <storgance> Well, if you look at QTextEdit, it does exactly what I want, but is for user input
[23:16:19] <altendky> oh...
[23:16:30] <altendky> i bet you can make it useful
[23:17:09] <altendky> you want it not editable i figure. what else do you dislike?
[23:17:14] <altendky> the frame
[23:17:51] <storgance> well, I'm assuming letting it grow will help prevent the scrolling feature
[23:18:03] <altendky> https://doc.qt.io consider what this says about variuos widgets
[23:18:35] <altendky> letting what grow?
[23:18:41] <altendky> you can generally turn off scroll bars
[23:19:18] <altendky> https://doc.qt.io
[23:20:23] <storgance> yes, I was going to do that as well, but I would still like all the text to be visible. I haven't tested that far yet, though
[23:20:56] <altendky> didn't you just say that QTextEdit shows the text how you want it to?
[23:21:39] <storgance> Yes
[23:21:57] <storgance> But, in my example it gets a scrollbar because it's a fixed size
[23:22:13] <altendky> you don't want it to have a scroll bar? turn the scroll bar off
[23:22:21] <storgance> so, I figured not having it be a fixed size will prevent the need, beyond just turning it off
[23:22:28] <storgance> in the case of it being a message
[23:22:35] <altendky> storgance: so let's say my word is 'a'*10000
[23:22:38] <storgance> yes
[23:22:47] <storgance> wait...
[23:22:49] <altendky> storgance: you want it to just resize to that width and not fit on any monitor?
[23:22:55] <storgance> turning of horizontal scroll will make it wrap??
[23:23:20] <altendky> storgance: you said QTextEdit does what you want with the text. you want the text wrapped. so i thought you meant that QTextEdit wrapped the text how you wanted it to
[23:23:36] <storgance> It does.
[23:23:36] <altendky> storgance: is there a widget that does the wrapping that you want?
[23:23:56] <altendky> storgance: ok, then it must already be wrapping
[23:24:34] <altendky> storgance: if it's doing that right then we can focus on what it's doing wrong. like having scrollbars. so we turn them off. which shouldn't 'make it wrap' because it already is wrapping, right?
[23:24:56] <storgance> QTextEdit does exactly what I want. I just brought up the scrollbar because I know it has a scrollbar in my current setup because of its fixed size. However, for the chat message, I cannot use QTextEdit, as QTextEdit is read and write, and I do not want people messing with the messages on purpose or on accident.
[23:25:28] <storgance> So, currently, my "msg" is a QLabel. But, QLabel lacks this automatic wrapping feature that QTextEdit has.
[23:25:35] <altendky> ok. so QTextEdit does the complicated wrapping thing how you want. you don't want scrollbars so turn them off
[23:25:40] <altendky> you don't want it editable so turn that off
[23:25:43] <storgance> Correct.
[23:25:49] <altendky> also, read the link above
[23:25:57] <storgance> There isn't a setEditable() member of QTextEdit
[23:26:08] <altendky> so i forgot that then, but read the link above
[23:26:44] <storgance> ...Oh
[23:26:47] <altendky> but note that... https://doc.qt.io
[23:26:58] <altendky> it's just a different name than expected
[23:27:22] <storgance> ...strange that the API is so different. I feel stupid now, duh. Sorry, and thank you.
[23:27:45] <altendky> meh, there's a lot going on. i don't remember the details obviously but i've been through it with these widgets before. :]
[23:27:52] <altendky> some vague recollections are left
[23:28:10] <storgance> For some reason my brain registered QTextBrowser as documentation for the Qt web browser...oops
[23:28:35] <storgance> Recollect well enough to have the answer, haha. Thank you agian
[23:28:36] <storgance> *again
[23:29:13] <altendky> storgance: you'll probably want to https://doc.qt.io or something related to hide the frame, i'm guessing
[23:30:02] <altendky> and depending where you want to control your background, maybe turn it off or maybe set it on the text edit
[23:31:25] <storgance> This certainly is a lot of good material...time to save it all up for tomorrow morning. Should probably get home before 11PM
[23:31:31] <storgance> thank you for all your help, altendky
[23:31:38] <altendky> storgance: good luck
[23:32:18] <storgance> You tooo
[23:33:10] -!- storgance has parted #pyqt