« first day (3138 days earlier)      last day (1795 days later) » 

 
2 hours later…
2:21 AM
anyone here?
 
2:31 AM
maybe
 
 
1 hour later…
3:40 AM
'App' & 'apps' are not recognized business industry keywords on ATO's (Australian Tax Office) website.
 
 
1 hour later…
4:46 AM
What do people generally do with the code they come up in a hackathon?
 
 
When you register as a company you can choose to register a company name, although a company name is not compulsory.
I didn't know that.
 
5:09 AM
I wonder how many functioning companies don't have a company name.
Setting up another company at the moment. Maybe one day I will be one of those people who sits on the board of many small companies ...
 
5:34 AM
Is there some way to set a QComboBox to have a (-1) selection without clear it? So that the next set command is guaranteed emit a index change signal?
 
nwp
6:04 AM
That sounds like an evil hack for a problem you should not have.
Have you tried activated?
 
Yeah, the underlying issue is a common one. You have some setStruct(struct) function. In your constructor you call setStruct(). This is supposed to configure the widget. But this might not work if the struct you are setting overlaps with the default, and doesn't trigger the indexChanged() signals.
 
 
1 hour later…
7:30 AM
@Mikhail If you're setting the default, nothing changed, so them not being fired sounds reasonable. You probably shouldn't depend on them being fired when nothing changed.
 
Yeah its a common design problem, but I don't understand the best solution. For example,changing a combobox triggers a redraw. But on first show, or if the first time you set the widget nothing changes, you won't get the value change signal issued, and nothing will get redrawn.
But then having a second code path for the first show/first change seems wrong.
 
you shouldn't need a second code path
for one, why do you need to redraw when nothing has changed?
and for two, why not just call a redraw() function in both cases?
 
Imagine a control that displays an image from some reference. You should have it change the displayed image every time a user changes the combobox. So, the signal tells the image to be drawn from the index of the combobox. You'd need to write a little bit of extra code to display the image that the controller is by default configured to show.
So, in Qt you can connect the signal/slots to things like comboboxes before populating them with options. When you add the first item to the combobox, it will set the index of the current item from (-1) to (0). Then I'd need to connect everything before wrangling the labels for the comboboxes.
 
well, one expects that you have, I dunno drawImage(index), so just call that when you're showing the combobox
the problem you're describing is endemic to shit UI paradigms like Qt's
if you want it to not suck, you need a React-style paradigm
 
Is that code for hire somebody else to do it for you?
 
7:41 AM
you don't need a separate code path, you just need to invoke the same code path one extra time
 
Yeah, so I fucking tried to invoke it again, but then I realized the signals aren't raised because no state change has happened if the combobox is in the default setting. Which is obvious, but also sad.
 
if you're gonna invoke the thing directly, why do you care about state changes in the combobox? you bypassed them by invoking the thing that gets invoked if the combobox state changes
 
Can't you default it to a dummy value, but dummy value is not accepted as valid selection as to force people into actually selecting something?
 
So, GUI is a lot more nested then in the example I gave. So I can force one item to change, but there are a bunch of other items that need to be "forced".
Ideally, I'd flow the struct that the GUI is supposed to hold through the GUI once on first show but the problem is that my default GUI states are liable not to trigger the updates.
 
does the combobox not offer an onshown/onhidden kind of signal you can use?
 
7:58 AM
Sure, but the fundamental problem is that the GUI to be in some "unset/unconfigured" state before the first settings can be set.
 
 
4 hours later…
nwp
11:44 AM
You can block signals with QSignalBlocker. Maybe blocking signals during the "unset/unconfigured" state, populating everything and then unblocking signals is viable.
 
 
8 hours later…
7:45 PM
I love how you can just write hexadecimal as int's in C++
 
8:34 PM
@Rick "...int's as hexadecimal" sounds more sensible to me.
 
@JerryCoffin me too! I can remember this 0x7FFFFFFF but not really this 2147483647
 

« first day (3138 days earlier)      last day (1795 days later) »