D22375: new class KBusyIndicatorWidget similar to QtQuick's BusyIndicator

Harald Sitter noreply at phabricator.kde.org
Thu Jul 11 16:30:17 BST 2019


sitter added inline comments.

INLINE COMMENTS

> broulik wrote in kbusyindicatorwidget.cpp:62
> Is that legal in the C++ standard allowed by frameworks?

Well, it builds at least under c++11 which is what kf5 is compatible with.

According to this page <https://en.cppreference.com/w/cpp/language/data_members#Member_initialization> it should be fine (assuming the caveats mentioned are exhaustive anyway).

> kossebau wrote in kbusyindicatorwidget.h:40
> Any chance of getting some samples how this class is supposed to be used?
> 
> Sounds one should show & hide the complete widget when needed? How to best integrate in one's layout? As overlay?
> 
> BTW, the KDE HIG does not mention such a spinner. So the purpose from a KDE developer following the HIG raises a question with me wearing my naive hat :)
> https://hig.kde.org/components/assistance/progress.html

I am not sure there is a generally useful code sample to give here. Certainly not a helpful one.

  auto indicator = KBusyIndicatorWidget(this);
  layout().addWidget(indicator);
  auto label = QLabel("Busy watering the folowers", this);
  layout().addWidget(this);

Maybe this, but then I am not convinced of its usefulessness. That's just how one would use any widget ^^

You could overlay it on something, or HBox it next to a label, or add it as permanent widget to a StatusBar, or VBox it with something. Sky's the limit really.

> broulik wrote in kbusyindicatorwidget.h:65
> I heard for good measure one should always re-implement the generic `event` just in case

Do we have this document somewhere? That's the sort of thing that sounds like an urban myth someone started in the 90's ^^

REPOSITORY
  R236 KWidgetsAddons

REVISION DETAIL
  https://phabricator.kde.org/D22375

To: sitter, cfeck
Cc: ngraham, kossebau, broulik, kde-frameworks-devel, apol, LeGast00n, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190711/a7c67d6d/attachment.html>


More information about the Kde-frameworks-devel mailing list