<JordanBrown>
If anybody deeply understands Qt, I'd appreciate help on #4946 and figuring out how to get spin boxes to resize when you change the font of their text.
<InPhase>
That one's always a bit of a mess. There are like 10 different things that might constrain the size of any one thing and keep it from changing.
<InPhase>
Every time I fix a problem like that I feel like I'm flailing wildly in the wind.
<InPhase>
Not exactly a strong point of Qt.
<kintel>
I feel that anything inheriting from QWIdget is no longer a strong point of Qt : /
<InPhase>
lol
<JordanBrown>
One thing that might help is that the ParameterText box *does* resize, and they're both QLineEdit under the covers.
<JordanBrown>
(But maybe there's something in the QSpinBox that's clipping the underlying QLineEdit.)
<kintel>
I do wonder, though, if a better approach would be to set the font for a larger group of widgets
<kintel>
I didn't read the PR in detail, but I remember there being some way of styling widgets
<JordanBrown>
There's a lot of talk about inheriting fonts from parents, but it sure didn't seem to work for me.
<JordanBrown>
Stylesheets are, I suppose, a possibility.
<kintel>
I've never used stylesheets but it feels very much like that would be the ideal solution here. ..if they work that is : /
<JordanBrown>
Next interesting tidbit: combo boxes seem to be willing to grow from their initial size, and shrink back down to it, but won't shrink below that initial size.
<InPhase>
JordanBrown: One thing in OpenSCAD that differs from my prior usage of Qt is that we have these .ui files that seem to be... doing Qt stuff. I've edited them, but don't have a full mental model for how they interact. I do not see you having edited ParameterSpinBox.ui in your PR. I see wonders like 'hsizetype="Ignored"' in there.
<JordanBrown>
I understand them a *little*. The idea seems to be that you can do a lot of "rote" stuff without needing to write C++ to do it.
<JordanBrown>
But yes, and right at the moment I'm stripping stuff out of that one, to make it more like ParameterText.
<InPhase>
Yeah. I'm sure they're convenient in some way. But those files also seem like a novel way to shoot yourself in the foot.
<InPhase>
It brings the wonders of webdev layout struggles to C++.
<kintel>
Generally, the .ui files are edited by QtDesigner, not by hand.
<JordanBrown>
and in webdev I can use the browser's DOM/CSS inspector to figure out why something is happening...
<InPhase>
:)
<kintel>
One idea; Perhaps you can open the files in QtDesigner and fiddle with the fonts (or stylesheets) there. Perhaps that would help figure out what knobs need to be used
<JordanBrown>
I *can* control the size... as long as I do it at creation time. It's changing the size of an existing one that's the problem.
<kintel>
( but I understand the hesitance opening up another potentially annoying clicksy-clicksy tool ;) )
<kintel>
In QtDesigner, you can also change things as "runtime" I think
<kintel>
..but something needs to be hooked up for that to work. I seem to remember they having some nice signal-slot connectors and a mode for visual testing
<kintel>
..but I haven't fired that one up in like a decade.
<kintel>
Also, would Qt6 help? ..or make it worse?...
<JordanBrown>
No clue...
<kintel>
You're very close to opening up a rabbit hole filled with cans of worms here :)
<JordanBrown>
We need fish to eat the worms.
<JordanBrown>
Aha! It appears that when you tell the QDoubleSpinBox to change its font, it doesn't tell the QLineEdit.
<JordanBrown>
And when you tell the QLineEdit directly, it doesn't tell the QDoubleSpinBox that it needs more/less space.
<JordanBrown>
But if you tell the QLineEdit to change its font, and *then* you tell the QDoubleSpinBox to change *its* font, that latter (even though it doesn't change any font) causes it to reassess its size.
<JordanBrown>
Where previously I had everything coming up OK on startup, and having troubles on changes, now I'm finding that it doesn't pick up the settings on startup, only when you make some change. Haven't really characterized it yet.
<JordanBrown>
I'm not sure whether that's just a behavior I hadn't noticed, or if it's because of some cleanup work I did.
<JordanBrown>
Too much fun.
<JordanBrown>
__func__ is a symbol that is magically set to the name of the current function. Is there a similar symbol that is magically set to the name of the current (compile-time) class?
<kintel>
You might have some luck with typeid(*this).name()
<JordanBrown>
That might be good, but I don't think it's quite what I was looking for. "this" might point to a subclass, but if we're in a superclass's method I'd want it to be the superclass's name, not the subclass's.
<JordanBrown>
I want to use it in a printf that I can copy and paste unchanged from one point to another, to mark trace where I am in the program.
<JordanBrown>
s/mark//
<InPhase>
JordanBrown: I usually use __FILE__ and __LINE__
<JordanBrown>
Yeah, me too, from pre-C99 habits, but __func__ is more directly human-understandable.
<InPhase>
Assuming you have just the one per function. :)
<JordanBrown>
__func__ and __LINE__
<JordanBrown>
With __FILE__ you have to go look at the source to figure out what function you're in.
<InPhase>
JordanBrown: Maybe you want __PRETTY_FUNCTION__ I remembered there was something like that, but had to look it up.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<InPhase>
That'll grab your class marker as well.
<JordanBrown>
That gives you the full signature, which seems like overkill.
<InPhase>
C++, so that checks out. :)
<JordanBrown>
There are a number of answers on Stack Overflow, most of them based on parsing __PRETTY_FUNCTION__.
<JordanBrown>
I think some of them manage to parse it at compile time.
<InPhase>
This is how you fall into the rabbit hole of debugging your debugging code.
<JordanBrown>
Which is a fine place to be, if your debugging code is expected to be used for a long time.
califax has quit [Remote host closed the connection]
<JordanBrown>
It is absolutely wonderful to work in environments with mature debugging code.
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
guso78k has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
<JordanBrown>
But you have to accept that creating and maintaining the debugging code is a project in its own right.
<JordanBrown>
Part of the puzzle for that startup issue is that when you give it a file name on the command line, it opens the file and sets up the Customizer *before* it finishes setting up the main window.
<guso78k>
JordanBrown, I also see openscad "preview" empty source code beore actual code is loaded and this is "previewed" again
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<JordanBrown>
guso78k I believe it.
<JordanBrown>
I think a lot of stuff is set up prematurely.
<JordanBrown>
Anyhow, bedtime.
<JordanBrown>
Past bedtime.
califax has quit [Remote host closed the connection]
guso78k has quit [Quit: Client closed]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
J24k46 has quit [Quit: Client closed]
J24k46 has joined #openscad
J24k46 has quit [Quit: Client closed]
J24k46 has joined #openscad
jonasbits has quit [Remote host closed the connection]
snaked has quit [Remote host closed the connection]
guso78k66 has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Read error: Connection reset by peer]
califax has joined #openscad
ferdna has joined #openscad
guso78k33 has joined #openscad
kintel has joined #openscad
<kintel>
teepee Yeah, flattr was practically dead anyway. Managed to get our last funds out back in October
<teepee>
yeah, now it's final, at least with message
<teepee>
not like bountysource.... *poof*
guso78k33 has quit [Quit: Client closed]
guso78k62 has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
<guso78k66>
was it same concept as bountysource?
<kintel>
No, it was a pure microdonation service
califax has quit [Ping timeout: 240 seconds]
califax has joined #openscad
<teepee>
it was micropayment distribution, like person pays 10€ per month and while the month is running clicking on flattr buttons all over the internet
<teepee>
at the end the money is distributed evenly across the websites
<teepee>
not a bad idea, but too realistic to work
<guso78k62>
people pay money for a script to press buttons in their homepage?
<teepee>
also, getting up before 7am is just a bad idea ;-)
<teepee>
not in their own page
<teepee>
e.g. if you have a blog, or the openscad homepage had the button
<teepee>
if people clicked it, that person/project would get a part of the person paying into flattr
ferdna has quit [Quit: Leaving]
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
tcurdt- has quit [Remote host closed the connection]
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FluxLalonde has joined #openscad
guso78k62 has quit [Ping timeout: 250 seconds]
guso78k66 has quit [Ping timeout: 250 seconds]
guso78k has quit [Ping timeout: 250 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
J24k46 has quit [Quit: Client closed]
J24k46 has joined #openscad
Nikita_Peccator has joined #openscad
Nikita_Peccator has left #openscad [#openscad]
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]