Important: Please read the Qt Code of Conduct -

Suggestion to add convinience to layouts.

  • I noticed adding a high number of widgets to layouts can be a little tedious, even with the duplicate line feature of Creator. Right now you have to do them one by one:


    I think it will be much more convenient to stick to the "ideology" to C++ and add a << operator to qlayout and add widgets with chaining:

    @layout << w1 << w2 << w3 ... << w_n;@

  • Moderators

    Would be easy enough to add to your own project code as boilerplate...

    QBoxLayout &operator<<(QBoxLayout &layout, QWidget *widget)
    return layout;

    Brain to terminal... ymmv.

  • Yes I know how to do it, my point was some contributor adding it to Qt, it is much quicker and also intuitive to "insert" widgets into layouts.

  • Moderators

    utcenter: Please push your contributions into "gerrit": .

    Don't wait for someone else to implement your ideas!

  • Moderators

    It's not an unreasonable idea, I think.

    If you'd like to make a formal suggestion of it (assuming you don't want to contribute it, yourself) then you should open a request on "Jira.":

  • @mlong, Tobias - I don't have an account there, that is why I posted the suggestion here, there is no point registering just for that little thing, and it would cost nothing people who are already registered and contribute on daily basis to do it.

  • Moderators

    There are no little things. :-)

    Seriously, though, it doesn't take but a moment to register for either account. And even if you use your account on the bugtracker for nothing more than voting for bugs or features that you're interested in, you're still contributing in a tangible way.

    [Edit: Added the rest of my text because I apparently don't know the difference between the Preview and Post buttons; mlong]

  • But it is.

    I assume as a "certified specialist" and moderator you are registered at Jira - it would have taken you less time to post this for me than urging me to do so in this thread, especially considering it is a good idea. I just don't get it why should I be "extorted" into bothering to register for one single post so that users can get a faster way of adding multiple widgets to layouts?

    Edit: It would take you just a moment too, an even shorter moment as well, so what's stopping you?

  • It's not a little thing. Pushing a new-feature-commit to gerrit is not so easy as you have thought.

    • API review
    • Documentations
    • unit test
    • ...

    BTW, are you talking Qt4 or Qt5?
    You should know that, if there is no plan for Qt4.9, such a feature can not implemented in Qt4.

    As Qt5.0 have been feature frozen, it's hard for you to push this feature to Qt5.0.

    [quote author="utcenter" date="1338840072"]But it is.

    I assume as a "certified specialist" and moderator you are registered at Jira - it would have taken you less time to post this for me than urging me to do so in this thread, especially considering it is a good idea. I just don't get it why should I be "extorted" into bothering to register for one single post so that users can get a faster way of adding multiple widgets to layouts?

    Edit: It would take you just a moment too, an even shorter moment as well, so what's stopping you?[/quote]

  • Moderators

    Wow. Just... wow.

    There's no extortion at all. You're the one with that particular idea and suggestion. Don't complain that nobody else will do the work for you. You are just as capable as anyone else. There are methods in place to both submit working code (through gerrit) or make a request for a feature (through jira) Either of those are recognized ways of getting changes made.

    That's not to say that somebody else won't do it, but don't whinge if and when it doesn't happen.

    Being a specialist and/or moderator has nothing to do with anything. The other moderators and I volunteer time here helping out on the forums as best as we can. There are others who do more with coding. There are others who are heavy contributors to Qt proper, or Creator, or ports, or other things. There are those who write documentation. We all contribute in our own ways.

    I'm doing this in addition to my "day job" which has very little to do with the development of Qt and a lot with the day-to-day usage of it.

    Please don't assume that just because we have different roles that all those roles are interchangeable.

  • And still, my excuse is not being registered and not being convinced I should register for the sake of doing one single thing. What is yours? :) Stubbornness?

    I didn't imply it is your responsibility because you are a specialist and a mod, I implied you are probably registered at Jira.

    I have already taken use of the convenience I suggested and I took the time to propose it to everyone else, but that is an isolated case, I have no capacity of being a contributor to Qt (you are not the only one with a day job) thus my lack of enthusiasm in registering and learning how to deal with Jira, I have plenty on my mind already.

    bq. Pushing a new-feature-commit to gerrit is not so easy as you have thought.

    That is why I proposed here, leaving it for someone more experienced to deal with it, not that something as simple and straightforward requires extensive testing, could break source compatibility or requires more than a line of documentation.

    My "work" exceeds its limits with thinking of it and sharing it. It is not much, but it beats nothing. If there is someone with experience willing to contribute it to Qt - he'd be doing a favor to the community, if not - it is not that much of an issue, Qt has been just fine for years without it. I am surprised this is not part of the layout API, it is so intuitive I actually tried to do it without even checking if it is in the doc, and shared it when it turned out to be missing.

  • Moderators

    I do indeed have a jira account. And I created it at one point for doing exactly one thing: voting for a bug report that I found pertained to me. In the time since then, I have opened a couple of reports and voted on a few more features/bug fixes that I have an interest in. There's not a huge learning curve.

    My point: Don't assume that opening an account for one thing means that it is the only thing you'll ever do with it. It actually gives you a great opportunity for being able to quickly jump in and say things later on in a way that might get an audience.

    The simple fact is that those developers who jump in and whip out features like this typically don't hang out in the forums much. And even if they do, then one message is likely to go unnoticed unless someone reads each and every thread.

    All I'm saying is that regardless of how heartfelt, nifty, and valid your suggestion is, presenting it only on the forums (instead of the place specifically designated for "Hey I've got an idea!" types of messages -- Jira) is pretty much a guarantee that it will go nowhere.

    As such, I don't think it's out of line to encourage you to present your idea in the most ideal place to see a valid return on it.

  • My point gravitates around a phenomenon I've witnessed many times over. Thou it is not about feature suggestions but bug alerts from users.

    Plenty of bug alerts here in the forum as well as in the Labs and Blog section to which the usual response is "file a big report" - while filing a bug report is the proper action to address bugs, I simply don't get it why some people assume everyone is OBLIGATED to file bug reports. I mean, the very act of discovering a bug and informing of it is a contribution on its own, especially considering there are also people that get paid to do this kind of thing. Why instead of just posting the bug report themselves they hurry to employ others to do it instead?

    Does the discovery of a bug mean the one who discovered it is responsible for reporting it? That person has already contributed by finding and alerting of it, his obligation to report it is not any higher than anyone else who is aware of that bug, including the people who encourage others to file bug reports.

    So finding and alerting of a bug without reporting it is somehow a bad thing, but when those, alerted of it don't report it themselves and instead urging others to do it is noble or something?

    I mean COME ON, the very reason people alert of bugs is they don't want to bother to file bug reports, mostly because they are not registered at jira or haven't done it before. I doubt people live in the dark ages and are unaware of how things are happening, even if people never done it I am sure they are aware of the bug report mechanism and have decided not to go for it, but also to not be completely idle about it and go at least half the way into forwarding the bugs to other people, who might file proper bug reports.

    In short, to put it this way:
    Finding a bug and reporting it = 1 contribution
    Finding a bug and alerting of it = 0.5 contribution
    Saying "file a bug report" = 0 contribution

    You act like I am waiting on others to do my job, but in reality it is more like I expect others to pitch in instead of waiting on me to do everything. You cannot force people to contribute 100% and you should appreciate contributing at 50% because it is still better than 0%. Don't you agree?

  • Moderators

    My point is nothing more and nothing less than this:

    It's completely fine to mention possible bugs, or discuss ideas for features here in the forums. It's a great place to do that and bounce ideas off of people. That's what the forums are for.

    However, the audience here is limited and typically are not those who are involved in the fixing of said bugs or the implementation of said features. Jira, though, is the official repository of bugs and feature requests. As such, any requests and reports should officially be made there. If you have a vested interest in making sure that the report or the feature request gets recorded, then you should take the opportunity to make sure it gets reported there.

    So if it turns out that your 50% contribution is not meaningful or valid because it doesn't guarantee that many people will see your alert (especially the people who should see it) then no, I completely disagree with your assertion.

    Think of it this way:

    Imagine you have a household where it is somebody's job to do the laundry. (Could be you, could be a roommate or spouse, could be a hired maid, or some combination thereof.) The only requirement is that you need to put your dirty clothes in a hamper in order for them to be cleaned.

    If you have a dirty shirt and throw it into a corner instead of putting it into the hamper to be laundered, then the shirt might not (and probably won't) get cleaned -- even though you've exerted the energy to put the dirty shirt somewhere . You might have mentioned to everyone in passing that you threw the shirt into the corner and that it was dirty. However, it's not everyone else's responsibility to look through the dark corners to search out your dirty laundry. Furthermore, if people DO have to go searching through the corners to find the dirty clothes, they're probably not going to be too pleased with the exception to the normal workflow. You yourself might not be expected to do the washing, but there is an expectation that you lay out what needs to be taken care of in a well-established location.

    If you don't really care one way or another if your shirt gets cleaned, then tossing it in the corner is fine... but you lose the right to complain that it's still dirty two weeks later, and you definitely don't have the foundation to complain that other people just aren't doing their part.

  • utcenter,

    I don't agree with You ;-).

    If you find a bug and don't want to file this bug, people who thought it important will want to file a bug, and commit a patch to fix it when they have time.

    But if want your suggestion to be accepted, you must let it known to the developers at least. And as mlong said,

    bq. The simple fact is that those developers who jump in and whip out features like this typically don’t hang out in the forums much.

    There are many bugs exists in the, developers need to verify whether they are valid or not, then decided open or close them, assign it to one proper developer. At present, developers from Nokia and others are busy with fixing Qt5.0 bugs.

    If you really think it's useful for others, you can try to commit a patch for it, other developers will give you more advice. You can see what will happen when one want to add a small new feature from this example:


  • @mlong - your allegory is not really fitting the situation, as there are quite many people that get paid to "search for dirty shirts and put them in the washing machine" and in that case throwing all your shirts in the corner is actually assisting them, since instead of looking all lover the place they go and pick up the bulk of dirty shirts in the corner.

    And I wouldn't even call it "in the corner" it is about compartmentalization. Lets assume the washing machine is down in the basement, and it is a 50 story building, and it is tedious for everyone to keep going down to the basement to put each and every shirt in the washing machine. Instead of "in the corner" I'd go for for a "dirty shirt baskets" where people toss their dirty shirts conveniently, and those, who get paid to clean shirts pick them up from the baskets (locations where users alert of bugs) and put them into the washing machine all the way in the basement (file proper bug reports).

    You cannot expect everyone to go down to the basement and learn how to operate the washing machine, volunteers will do it, but still there are many people that wish to be somewhat helpful and forward their dirty shirts to the baskets instead of leaving them all over the place to be searched.

    Furthermore, it is not about OUR dirty shirts, it is about the dirty shirts of Qt, so finding a dirty shirt laying somewhere and picking it up to put it in a dirty shirt basket is still a good thing, maybe not as good as putting it in the washing machine and washing it but still better.

    If you find garbage laying in the street the right thing for a model citizen to do is pick it up and toss it in a garbage can, not carry it all the way to a garbage collector, not to carry it all the way to a waste processing plant. It doesn't take a society of garbage collectors to keep the streets clean, it takes only people, responsible enough to bother to forward garbage to where it can be dealt with.

    I don't recall there being a rule "you found it you have to report it" - any conscientious contributor should report bugs, whether they discovered those bugs themselves or they were informed about those bugs by conscientious developers. Not every developer must be a contributor, but a contributor who responds to a bug with "file a bug report" actually does LESS than than a regular user who discovered and bothered to inform of it in a place, where contributors are likely to spot and address the issue. In that case, the regular user goes beyond what is expected of him, while the contributor does... nothing.

  • Moderators

    No. It's easy to file a bug report or feature request. Your argument seems to hinge on the assertion that using jira is complex with a large learning curve involved. It isn't.

    Filing a report there is putting your shirt in the shirt basket. If you don't report an issue at the bugtracker, you might as well stop a random person on the street and tell them. The people who fix bugs work off of the reports in the bugtracker, not the forums, not through irc conversations, and not trough mailing list posts. The reason there is a resounding chorus of "file a bug report" is because that's where bugs and features are supposed to be reported. It's the central repository for those things. If it were hard to make a report there, then it would be understandable to want to make notes elsewhere. But it's not. So I hope you can understand why an abject refusal to take part in the proper process is met with a raised eyebrow.

    The long and short of it is that in the time that we have spent debating this on here, a feature request could have been logged many times over. So, regardless of how precious your time is or how strongly you feel that following through with a proper process is unnecessary, the fact doesn't change that your effort has been spent here trying to make a weak point rather than taking the effort to throw your two cents in where your words will carry much more weight.

    Find your audience and address the right people. Its that simple. Don't expect others to stumble across your post and finish what you started.

    That's all I've got.

  • You are being far from objective, there is a HUGE difference between stopping a random person on the street and posting about a but in a place, swarming with trolls and contributors. Random people on the street may not know the first thing about Qt or programming in general, so how is it the same as informing a person who is an experienced contributor or even getting paid to do it?

    Look at the model of democracy (not that is working too well, but it is the model in use) - it is not like everyday Joes go into the parliament and write the changes in laws in the list of laws to be voted on, politicians are supposed and expected to listen to people voicing concerns and address them.

    Ultimately - a contributor, informed of a bug has higher responsibility to post a bug report than an average user, who was kind enough to alert of the bug in a place, frequently visited by contributors, in that case the user saves the contributor the effort of finding that bug, so the contributor might as well save the user the effort to file it, which is not really his responsibility.

  • Moderators

    Sorry, "second hand bug reports" are just not helpful: The person trying to fix them can not get back to the person that has the issue to clarify the report. Most such reports to end up as "can not reproduce" and get closed.

    So please don't expect anybody to report your issues. If you do not feel like reporting them yourself (or answering questions on the issue after reporting), then by all means don't report them. But don't expect anything to change then.

    Also note that the only people getting paid in relation to this website are the admins running the servers as far as I am aware. The people with the "Troll" badges are developers that hang out here in their spare time. I am certainly not paid to check the postings here and am in fact not checking this site while in the office.

  • @Tobias - whether or not "second hand bug reports" are helpful is entirely up to people like you. If you see it and instead of posting it, you just say "file a bug report" then the effort of that user to alert of that bug is wasted.

    As I said, alerting of a bug goes half the way through, saying "file it" and ignoring the actual bug does nothing. Regular users are not obligated to even alert of bugs, doing so is a product of good will and a contribution on its own, contributors on the other hand are supposed to do that kind of stuff, so where you have a "going beyond responsibilities" for general users who alert of bugs toy have a "not following their responsibilities" for contributors who don't forward it. Not to mention as a troll, you get paid to improve on the library.

    Let me put it in a slightly more serious context - you are a vehicle engineer, there is a fatal flaw with a vehicle you designed that causes accidents and claims people's lives. Does this mean you sit idly by when the forum of your company gets informed of that flaw, waiting for some official bit of paper while more defective and dangerous products get shipped to unsuspecting consumers? Or do you pay attention, investigate and forward the issue yourself instead of waiting on others?

    So you getting paid to maintain Qt means you should ignore flaws you stumble upon? How is finding a bug in the forum different from finding a bug in the source code? Why should you take different course of action and ignore the bug just because someone else found it and bothered to inform of it in a place you are likely to see it???

    Not intending to offend anyone in particular, but being a long time user of other libraries - the Qt community certainly doesn't make a good impression. Bug alerts in the forums of those libraries are not being ignored after provoking a useless "file it" response.

    EDIT: I agree there is no guarantee any qualified contributor will stumble upon a bug alert here in the forum (heck there is no guarantee a bug will be resolved if filed too, there are plenty that are unresolved despite their age and vote count), but after one does it is on him too, I have my doubts it falls into his professional responsibilities to do nothing about it. Maybe I should address your employer with an inquiry whether you are paid to ignore bug alerts... If you wouldn't ignore a bug in the source code, why would you ignore a bug someone else found and forwarded to a location of your attention?

Log in to reply