@veronica@mastodon.online
@veronica@mastodon.online avatar

veronica

@veronica@mastodon.online

Senior Developer at https://mastodon.social/@turtlesec ★ High Energy Physics PhD from Uni Oslo and CERN ★ Linux ★ Python ★ Open Source ★ Unicode Unicorn ★ ISO 8601 Enthusiast ★ Consumer of Sci-Fi ★ Hobby Writer ★ Born at 336 ppm CO₂ ★ she/they, Dr.

Open Source: https://novelwriter.io, https://fosstodon.org/@novelwriter

(Banner image from Wallpaper Access)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

veronica, to python
@veronica@mastodon.online avatar

Any Qt + Python devs out there with any experience on calling deleteLater() from the Python side?

I have some costly dialogs I want cleared on close, and so far I've been running deleteLater() in the closeEvent, which is clearly a little risky. I do get the very rare segfault especially if I close one particular dialog which has a QTimer singleShot call. If the deleteLater() is called when it is running, I get a RunTImeError.

#Python #Qt #PyQt #OpenSource #Programming #Code

veronica,
@veronica@mastodon.online avatar

I have experimented with a lot of solutions, including sip.delete and setting Qt.WA_DeleteOnClose, and those are even worse (kind of expected).

What I've tried now is to call setParent(None) instead in the closeEvent, and that definitely triggers the class del on the Python side, and seems to reduce the number of QWidgets in the app back to the expected value.

Anyone with some experience with this that can advice?

veronica,
@veronica@mastodon.online avatar

Do you do any Python + Qt work, @carlschwan?

veronica,
@veronica@mastodon.online avatar

There is definitely an issue here arising from Qt and Python both having a garbage collector that don't really talk to each other.

The easy solution is to not tell Qt to do anything at all, and just keep adding more stuff into memory, or try to re-use dialogs. However, re-use comes with the complication of having to clear old content first, and I also have dialogs that are used in multiple instances simultaneously with different content.

veronica,
@veronica@mastodon.online avatar

@ogi Thanks! I'll have a read through that.

Yes, deleteLater is clearly risky. I believe it is safe for on-the-fly generated context menus, which I delete after the exec call returns, but I really want a better solution for dialogs.

veronica,
@veronica@mastodon.online avatar

@liamcollod Yeah, not relevant as far as I can tell.

Edit: To clarify, it's not the Python garbage collector that causes the problem, but that the one in Qt runs too early. Hence the Python-side RunTimeError that occurs when the C++ object is suddenly gone.

janamarie, to random
@janamarie@chaos.social avatar
veronica,
@veronica@mastodon.online avatar

@janamarie Very nice!

atlefren, to random Norwegian Bokmål
@atlefren@snabelen.no avatar

– Oppsummert er ikke det norske næringslivet gode nok ennå i dag til å ta i bruk kunstig intelligens, sier digitaliseringsminister Karianne Tung.

  • Oppsummert er ikke norske snekkere gode nok til å ta i bruk hammere, sier bygningsminister H. Ammer.
veronica,
@veronica@mastodon.online avatar

@atlefren @aslakr Mye CMOT Dibbler viber der ja (for de som har lest Discworld).

veronica, to random
@veronica@mastodon.online avatar

This week, plus four more weeks until I can start my summer vacation. Four full weeks of no meetings and no work. Can't wait! Already counting down.

Sometimes I think that I would like to take a sabbatical, like a full year, to do other things. But I also know that last time I was between jobs* for three months, I got very bored.

  • I was literally between jobs. As in, I had a new job contract, but was waiting for a security clearance to go through so I could start.
veronica,
@veronica@mastodon.online avatar

@markus In as much as the plan is to do whatever I feel like doing, when I want to, yes. I have a plan 😁

I have a few things I want to get done though, like put shelves in my storage unit in the garage of the building.

carlschwan, to random
@carlschwan@floss.social avatar

Yeah all my patches in Qt that I mentioned in https://carlschwan.eu/2024/04/14/improvements-to-qtextdocument/ got merged just in time before the Qt 6.8 feature freeze!

veronica,
@veronica@mastodon.online avatar

@carlschwan Fantastic!

The QTextDocument really needs better support for HTML. I just gave up on it for my own project and I'm now building documents with QTextBlockFormat and QTextCharFormat instead.

The ODT writer is also very limited. I already implemented my own a long time ago.

veronica,
@veronica@mastodon.online avatar

@carlschwan Now, if someone could just add support for line height in QPlainTextDocument, my users would be very happy. 😁

veronica,
@veronica@mastodon.online avatar

@carlschwan The issue in QPlainTextEdit (and QPlainTextDocument) is that it has a much simplified layout engine based on a fixed line height. I suspect that's why it's not there. But neither editor has a line height default property. It has to be set on the text block level, which is inconvenient. The plain text layout engine ignores this setting in either case. At least last time I looked at the source (probably 6.4-6.5 or something).

KaraLG84, to random
@KaraLG84@dragonscave.space avatar

We're watching Independence Day: Resurgence for the first time. So far the best thing about it is Jeff Goldblum being Jeff.

veronica,
@veronica@mastodon.online avatar

@KaraLG84 I saw it when it came out, and as I recall, Jeff Goldblum was the only thing good about that film!

marta, to random Norwegian Bokmål
@marta@oslo.town avatar

Tenk på at ( osv) går på streik fordi de VIL IKKE HA solidaritet. Faen, for en perverse forståelse av .

veronica,
@veronica@mastodon.online avatar

@kvaks @marta Nå er det fra E24 da, så jeg tar det med en klype salt til jeg ser en direkte kilde.

veronica,
@veronica@mastodon.online avatar

@marta @kvaks Jeg mener akkurat det jeg sa.

zorinlynx, to random
@zorinlynx@tiggi.es avatar

I really hate "AI" search results. DESPISE them.

What it is, in the end, is a completely unsourced answer. You're just getting a couple of paragraphs as an answer to your query, with absolutely NO friggin' idea where the information came from.

If you cannot vet information, it is WORSE than useless. It can cause damage if it's wrong. We're already seeing some scary and dangerous "answers" from Google's AI for example.

I much prefer a list of normal Internet search results. Sure, some of them might be COMPLETE bullshit, but at least I can see WHERE the information is coming from, and decide what to trust based on the reputation of the sites in question.

Just... No thanks, Google, Microsoft, etc. Please remove this garbage that's making your services worse.

veronica,
@veronica@mastodon.online avatar

@_noelamac_ @zorinlynx Hence the nickname "mansplaining as a service".

Patricia, to random
@Patricia@vivaldi.net avatar

People who think I was hash against the book should read it. But then really, actually read all of the words, and not give up, skim and start just looking at pictures and headlines.

veronica,
@veronica@mastodon.online avatar

@Patricia After a few years in the "industry", I've come to the conclusion that a lot of the agile stuff is a whole lot of management dogmatism. There are bits that work and bits that don't. Last we had a coach at Day Job™, there was a lot of talk and buzzwords and little substance (read evidence).

In academia, I never came across this stuff. We were mostly just plodding along and teaming up on our code about as well as stray cats, which is very academic-y. Not exactly efficient either.

veronica,
@veronica@mastodon.online avatar

@Patricia Of course, as an academic, I'm very sceptical of any claim not supported by evidence. Management is, and always has been, mostly just that.

Myers-Briggs anyone?

veronica, to stackoverflow
@veronica@mastodon.online avatar

Well, fuck you Stack Overflow. I deleted my answers and have now deleted all my accounts.

veronica,
@veronica@mastodon.online avatar

@risike It definitely is still there. They undeleted the content, which thankfully wasn't a lot because they've always been gatekeeping asshats over there. My account is still there too as they completely ignored my GDPR request.

The only 100% sure thing here is that I will never contribute an iota of content to that site ever again. Exploitation is definitely a deal breaker.

veronica, to ai
@veronica@mastodon.online avatar

Slack is being passive aggressive about us requesting our data not be used for global "AI" training at work:

"You will still enjoy all of the benefits of our globally trained AI/ML models without contributing to the underlying models."

No idea what these supposed "benefits" are in the first place, but OK then!

arstechnica, to random
@arstechnica@mastodon.social avatar

Microsoft’s new “Recall” feature will record everything you do on your PC

Recall uses Copilot+ PC features "to take images of your active screen every few seconds."

https://arstechnica.com/gadgets/2024/05/microsofts-new-recall-feature-will-record-everything-you-do-on-your-pc/?utm_brand=arstechnica&utm_social-type=owned&utm_source=mastodon&utm_medium=social

veronica,
@veronica@mastodon.online avatar

@5ciFiGirl Enshittification as a service.

hamatti, to random
@hamatti@mastodon.world avatar

Good bye unemployment.

I just accepted a job offer and couldn't be happier right now.

veronica,
@veronica@mastodon.online avatar

@hamatti Congrats!

atlefren, to random Norwegian Bokmål
@atlefren@snabelen.no avatar

Inntil det kommer en botaniker og forteller meg at "well, actually" så kommer jeg til å bli oppgitt hver gang dette grasset folk får av å plante upoppa popcorn kalles popcorngress. Mais. Maisplanten gir oss popcornet. Planter du frøa til maisplanten får du mais.

Du får ikke guacamole-gress ved å plante en avocadostein.

veronica,
@veronica@mastodon.online avatar

@atlefren Ja, jeg må si jeg skjønte ingenting av hva de snakket om i Nrk sin artikkel om "popcorngress". Hadde et eneste stort "hæh?"-øyeblikk. Ble litt klarere da det sto på slutten at de mente maisplante. Jeg tror definitivt ikke de gjorde artikkelen lettere å skjønne med det der ...

veronica,
@veronica@mastodon.online avatar

@atlefren Se også: sjokoladebusk og kokosmelktre.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines