Missing Button Labels

258 views
Skip to first unread message

Joachim Kohlhammer

unread,
Mar 11, 2025, 4:01:20 PM3/11/25
to golden-cheetah-users
As of recently, the "+-"-Buttons below lists don't show their labels any more when using Qt6 (Qt5 still works):
Bildschirmfoto_20250311_204105.png
Setting the padding of these buttons to 0px fixes it for me. If others also experience this issue (Linux and Windows only, Mac should not be affected), I could prepare a PR

As I am using Debian unstable I can't say when this behaviour started. Installed version is 6.8.2. Changing theme or font doesn't make a difference.

Ale Martinez

unread,
Mar 11, 2025, 5:25:47 PM3/11/25
to golden-cheetah-users
El martes, 11 de marzo de 2025 a la(s) 5:01:20 p.m. UTC-3, Joachim Kohlhammer escribió:
As of recently, the "+-"-Buttons below lists don't show their labels any more when using Qt6 (Qt5 still works):
Bildschirmfoto_20250311_204105.png
Setting the padding of these buttons to 0px fixes it for me. If others also experience this issue (Linux and Windows only, Mac should not be affected), I could prepare a PR

Please do, thank you! I also started to see this when building Qt 6.8.2 on Windows 11.

Poncho

unread,
Mar 12, 2025, 3:29:46 AM3/12/25
to golden-che...@googlegroups.com
Yes please. I'm seeing the same issue with qt 6.8.2 on linux.

Joachim Kohlhammer

unread,
Mar 14, 2025, 9:59:11 AM3/14/25
to golden-cheetah-users

Created https://github.com/GoldenCheetah/GoldenCheetah/pull/4625, hope it covers all cases. If you find empty +- buttons, please let me know

The fix was done centrally in ActionButtonBox, which required its rollout to all affected UIs.
Sideeffects of this change are
* up-/down-/delete-buttons are inactive if no item is selected
* add-button is only active if number of items is in the allowed range (10 for zones, unlimited in most other cases)
* edit-button moved to the right if other buttons are present
* code could be reduced by 450 lines
* multiple #ifdefs could be removed

Ale Martinez

unread,
Mar 14, 2025, 1:22:29 PM3/14/25
to golden-cheetah-users
El viernes, 14 de marzo de 2025 a la(s) 10:59:11 a.m. UTC-3, Joachim Kohlhammer escribió:

Created https://github.com/GoldenCheetah/GoldenCheetah/pull/4625, hope it covers all cases. If you find empty +- buttons, please let me know

The fix was done centrally in ActionButtonBox, which required its rollout to all affected UIs.
Sideeffects of this change are
* up-/down-/delete-buttons are inactive if no item is selected
* add-button is only active if number of items is in the allowed range (10 for zones, unlimited in most other cases)
* edit-button moved to the right if other buttons are present
* code could be reduced by 450 lines
* multiple #ifdefs could be removed

Thank you, Joachim! It seems a good change from a maintenance POV, I merged it.
Perhaps we should review vertical alignment when other buttons -in particular Edit- are present, but this was already an issue before this change in some dialogs. 

Poncho

unread,
Mar 14, 2025, 4:48:40 PM3/14/25
to golden-che...@googlegroups.com
Hi Joachim

> If you find empty +- buttons, please let me know

There are some empty buttons in the window to set exhaustion points. See
the attached screenshot.

You get there by double-clicking on the x-axis in a performance chart.

Best regards,
Poncho
Screenshot From 2025-03-14 21-38-39.png

Ale Martinez

unread,
Mar 14, 2025, 7:57:55 PM3/14/25
to golden-cheetah-users
This is an example where buttons alignment looks weird:
Screenshot 2025-03-14 205541.png 

Joachim Kohlhammer

unread,
Mar 15, 2025, 1:59:46 AM3/15/25
to golden-cheetah-users
Will change it to vertically centered alignment

Joachim Kohlhammer

unread,
Mar 15, 2025, 2:01:14 AM3/15/25
to golden-cheetah-users
Missed that one because the +- are padded in code. Will look for more and create a new PR

Joachim Kohlhammer

unread,
Mar 15, 2025, 3:08:19 AM3/15/25
to golden-cheetah-users
One more issue I experience with Qt 6.8.2 (again: not Qt 5 or older versions of Qt6): When adding a new Python chart (both Activities and Trends), the settings dialog appears and disappears immediately without any user interaction. Adding other charts works fine, as well as opening this dialog for existing Python charts. Do you also see this behaviour?

Poncho

unread,
Mar 15, 2025, 5:28:00 AM3/15/25
to golden-che...@googlegroups.com
On 15.03.25 08:08, Joachim Kohlhammer wrote:
> One more issue I experience with Qt 6.8.2 (again: not Qt 5 or older
> versions of Qt6): When adding a new Python chart (both Activities and
> Trends), the settings dialog appears and disappears immediately without any
> user interaction. Adding other charts works fine, as well as opening this
> dialog for existing Python charts. Do you also see this behaviour?

Yes indeed, this is happening here too.
On gentoo with qt 6.8.2

Joachim Kohlhammer

unread,
Mar 15, 2025, 8:04:20 AM3/15/25
to golden-cheetah-users
Created next PR https://github.com/GoldenCheetah/GoldenCheetah/pull/4626, addressing more dialogs and the vertical alignment mentioned by Ale

Poncho schrieb am Freitag, 14. März 2025 um 21:48:40 UTC+1:

Ale Martinez

unread,
Mar 15, 2025, 9:39:16 AM3/15/25
to golden-cheetah-users
El sábado, 15 de marzo de 2025 a la(s) 9:04:20 a.m. UTC-3, Joachim Kohlhammer escribió:
Created next PR https://github.com/GoldenCheetah/GoldenCheetah/pull/4626, addressing more dialogs and the vertical alignment mentioned by Ale

Merged, thank you! 

Ale Martinez

unread,
Mar 15, 2025, 12:01:28 PM3/15/25
to golden-cheetah-users
El sábado, 15 de marzo de 2025 a la(s) 4:08:19 a.m. UTC-3, Joachim Kohlhammer escribió:
One more issue I experience with Qt 6.8.2 (again: not Qt 5 or older versions of Qt6): When adding a new Python chart (both Activities and Trends), the settings dialog appears and disappears immediately without any user interaction. Adding other charts works fine, as well as opening this dialog for existing Python charts. Do you also see this behaviour?

I see this on Windows too, it seems to be a problem with the web chart inside the dialog, it also happens if you try to create a Web chart.

For the Python chart, changing default to GC charts allows to continue:

diff --git a/src/Charts/PythonChart.cpp b/src/Charts/PythonChart.cpp
index d9f72694c..67e00478f 100644
--- a/src/Charts/PythonChart.cpp
+++ b/src/Charts/PythonChart.cpp
@@ -411,7 +411,7 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
         showCon = NULL;
         leftsplitter = NULL;
     }
-    web->setChecked(true);
+    web->setChecked(false);
 }

But enabling Web charting needs to be done after the chart is created.

Next week they release Qt 6.8.3, lets see if it makes a difference since this issue started with 6.8 

Ale Martinez

unread,
Mar 19, 2025, 3:24:06 PM3/19/25
to golden-cheetah-users
El sábado, 15 de marzo de 2025 a la(s) 1:01:28 p.m. UTC-3, Ale Martinez escribió:
El sábado, 15 de marzo de 2025 a la(s) 4:08:19 a.m. UTC-3, Joachim Kohlhammer escribió:
One more issue I experience with Qt 6.8.2 (again: not Qt 5 or older versions of Qt6): When adding a new Python chart (both Activities and Trends), the settings dialog appears and disappears immediately without any user interaction. Adding other charts works fine, as well as opening this dialog for existing Python charts. Do you also see this behaviour?

I see this on Windows too, it seems to be a problem with the web chart inside the dialog, it also happens if you try to create a Web chart.

Interestingly neither Ride Map in Activities view or Live Map in Train view are affected, even when they also use QWebEngineView to show the map webpage.

Ale Martinez

unread,
Mar 19, 2025, 7:14:52 PM3/19/25
to golden-cheetah-users
I found calling setUrl on the WebView fixes the use, currently I am using this workaround:

C:\Users\amtri\Projects\GoldenCheetahQt6\src>git diff
diff --git a/src/Charts/PythonChart.cpp b/src/Charts/PythonChart.cpp
index d9f72694c..da0b78534 100644
--- a/src/Charts/PythonChart.cpp
+++ b/src/Charts/PythonChart.cpp
@@ -396,6 +396,7 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
         installEventFilter(console);
         installEventFilter(splitter);
         installEventFilter(canvas);
+        canvas->setUrl(QUrl(""));

     } else {

diff --git a/src/Train/WebPageWindow.cpp b/src/Train/WebPageWindow.cpp
index 9cb52ef7a..cb4dc2cce 100644
--- a/src/Train/WebPageWindow.cpp
+++ b/src/Train/WebPageWindow.cpp
@@ -171,6 +171,8 @@ WebPageWindow::WebPageWindow(Context *context) : GcChartWindow(context), context
     connect(view->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadRequest*)), this, SLOT(downloadRequested(QWebEngineDownloadRequest*)));
 #endif
     connect(view->page(), SIGNAL(linkHovered(QString)), this, SLOT(linkHovered(QString)));
+
+    forceReplot();
 }

 WebPageWindow::~WebPageWindow() 

Joachim Kohlhammer

unread,
Mar 21, 2025, 1:25:47 AM3/21/25
to golden-cheetah-users
Your workaround fixes it for me on WebPageWindow, but not PythonChart. After finishing my current PythonCharts (yet another image gallery and radar) I will also try looking into this.
Message has been deleted

Joachim Kohlhammer

unread,
Mar 25, 2025, 6:55:25 PM3/25/25
to golden-cheetah-users
Ale, we are not alone and your workaround (setUrl(QUrl())) is spot on: https://bugreports.qt.io/browse/QTBUG-135002
Setting the html to an empty string works for me as well: setHtml("")

I see two options:
  1. Wait until the issue is fixed in Qt (however the Fix version "None" as of this writing)
  2. Add your workaround to all affected dialogs / charts
My vote is for #2 as there seems not to be a plan for a fix in Qt at the moment. If you wish I could create a PR.

Ale Martinez

unread,
Mar 25, 2025, 8:18:29 PM3/25/25
to golden-cheetah-users
Good to now!

I will wait till tomorrow they release Qt 6.8.3, if it is not fixed there I will push this fix:

diff --git a/src/Charts/PythonChart.cpp b/src/Charts/PythonChart.cpp
index d9f72694c..58baa3023 100644
--- a/src/Charts/PythonChart.cpp
+++ b/src/Charts/PythonChart.cpp
@@ -438,6 +438,7 @@ PythonChart::setWeb(bool x)

         // setup the canvas
         canvas = new QWebEngineView(this);
+        canvas->setUrl(QUrl());
         canvas->setContentsMargins(0,0,0,0);
         canvas->setZoomFactor(dpiXFactor);
         canvas->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));

diff --git a/src/Train/WebPageWindow.cpp b/src/Train/WebPageWindow.cpp
index 9cb52ef7a..cb4dc2cce 100644
--- a/src/Train/WebPageWindow.cpp
+++ b/src/Train/WebPageWindow.cpp
@@ -171,6 +171,8 @@ WebPageWindow::WebPageWindow(Context *context) : GcChartWindow(context), context
     connect(view->page()->profile(), SIGNAL(downloadRequested(QWebEngineDownloadRequest*)), this, SLOT(downloadRequested(QWebEngineDownloadRequest*)));
 #endif
     connect(view->page(), SIGNAL(linkHovered(QString)), this, SLOT(linkHovered(QString)));
+
+    forceReplot();
 }

I think it is not necessary to conditionally compile since it is a reasonable initialization anyway.

Ale Martinez

unread,
Mar 26, 2025, 12:36:24 PM3/26/25
to golden-cheetah-users

Joachim Kohlhammer

unread,
Mar 26, 2025, 2:30:58 PM3/26/25
to golden-cheetah-users
Thanks Ale, this fixes adding both types of charts for me (Qt 6.8.2)!
Reply all
Reply to author
Forward
0 new messages