Bug 421604 - Changing Layout.preferredWidth doesn't resize an applet
Summary: Changing Layout.preferredWidth doesn't resize an applet
Status: RESOLVED WORKSFORME
Alias: None
Product: Plasma SDK
Classification: Plasma
Component: plasmoidviewer (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-16 09:39 UTC by wojnilowicz
Modified: 2025-06-26 17:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
test case (1.71 KB, application/zip)
2020-05-16 09:39 UTC, wojnilowicz
Details
Screencast of the issue (37.54 KB, video/mp4)
2020-05-16 09:40 UTC, wojnilowicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wojnilowicz 2020-05-16 09:39:31 UTC
Created attachment 128504 [details]
test case

SUMMARY

I change Layout.preferredWidth of the applet dynamically at a given time interval but it apparently can't be seen when run in plasmoidviewer.

Size changes can bee seen properly though, if the applet is docked in desktop's task bar.


STEPS TO REPRODUCE
1. download and unpack my test case
2. run install-and-run-plasmoid.sh
3. plasmoidviewer should appear and org.kde.tutorial should be installed
4. add org.kde.tutorial applet to your desktop taskbar

OBSERVED RESULT
See attached video.

EXPECTED RESULT
The applet in plasmoidviewer should resize itself the same way as it resizes itself in the taskbar.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 32
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68
Qt Version: 5.13.2

ADDITIONAL INFORMATION
1) I read at
https://zren.github.io/kde/docs/widget/
how to emulate in plasmoidviewer, an applet in a taskbar.
2) I start my plasmoid by
plasmoidviewer --formfactor horizontal --location bottom --applet org.kde.tutorial
Comment 1 wojnilowicz 2020-05-16 09:40:21 UTC
Created attachment 128505 [details]
Screencast of the issue
Comment 2 wojnilowicz 2020-05-16 09:54:42 UTC
There is a workaround for this issue. One needs to insert
"main.parent.parent.width = widgetWidth"
in the timer's body in order to get a dynamically resizeable applet in plasmoidviewer.
Comment 3 TraceyC 2025-06-25 20:07:22 UTC
Thanks for the bug report. I'm sorry we weren't able to get to this yet. There have been many fixes and improvements since this was reported, and this issue may have been fixed.

Can you please re-test on your system with Plasma 6.4.1 or later and let us know if you can still reproduce the problem? If you can, please set this report back to REPORTED. Thanks!
Comment 4 wojnilowicz 2025-06-26 15:39:57 UTC
Unlikely. I don't use KDE anymore.
Comment 5 TraceyC 2025-06-26 17:40:33 UTC
Thanks for letting us know. I'll close this out.