Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acceleration keys are not always working and then shown "as text" #339

Open
GitMensch opened this issue Oct 27, 2021 · 15 comments
Open

acceleration keys are not always working and then shown "as text" #339

GitMensch opened this issue Oct 27, 2021 · 15 comments
Labels
bug upstream bug in third party dependencies / libraries

Comments

@GitMensch
Copy link
Contributor

GitMensch commented Oct 27, 2021

contained &

the title has a contained &.

Hm, this isn't shown in the Dec2020 screenshot https://raw.githubusercontent.com/KDAB/hotspot/master/screenshots/dockwidgets.png is that a new issue or only happening on this machine?

@GitMensch GitMensch added the bug label Oct 27, 2021
@milianw
Copy link
Member

milianw commented Oct 29, 2021

I wonder if that's a system level thing - what version of Qt are you using? Are you using KDE Plasma or something else? If not, can you try with Plasma and see if the issue persists?

@milianw
Copy link
Member

milianw commented Jun 15, 2022

no input since many months, closing

@milianw milianw closed this as completed Jun 15, 2022
@GitMensch
Copy link
Contributor Author

So I now could reproduce this on different machines and OS (Debian, CentOS7, CentOS8) using the current AppImage.

You can see this when dragging out tabs into its own window, and it is also visible in the timeline view.
All machines are "terminal and X-forward-only" so I guess "try with Plasma" won't work, would it?

@milianw milianw reopened this Dec 1, 2022
@milianw
Copy link
Member

milianw commented Dec 1, 2022

hm maybe the accelerator doesn't work properly on other platform styles? the &i should be turned into an accelerator and pressing alt should highlight the i and alt+i should focus that then...

@GitMensch
Copy link
Contributor Author

Wherever it is recognized the acceleration key works fine (menu, "within the view", ...) but not for separate "windows"

sample

@GitMensch GitMensch changed the title minor glitch in Disassembly view acceleration keys are not always working and then shown "as text" Dec 5, 2022
@lievenhey
Copy link
Contributor

lievenhey commented Dec 6, 2022

I can confirm this issue on 5.26.3 with wayland
happens after moving a dockwidget in its own window

This is the title bar. Normally there are no accelerators, so this is somewhat exspected if you use a title with an accelerator.

grafik

@lievenhey
Copy link
Contributor

doesn't happen when using x11 (QT_QPA_PLATFORM=xcb hotspot when running wayland)

@GitMensch
Copy link
Contributor Author

GitMensch commented Dec 6, 2022

So that's actually a QT issue? [note: the setting above does not change anything on the gitpod or local builds using x11 forwarding]?

Any idea how to tackle that?

@lievenhey
Copy link
Contributor

not really, I am not sure if the problem is in Qt, KDDockWidgets or KWin

@iamsergio
Copy link

I think we reached the conclusion this was a Qt bug (not with all styles), with the implementation of drawing QStyle::CE_DockWidgetTitle

@GitMensch
Copy link
Contributor Author

GitMensch commented Mar 7, 2023

Thanks for the note - is there a known workaround?

@iamsergio
Copy link

Bug should be reported to Qt. Here's a minimal repro without dock widgets

#include <QtWidgets>

// These work:
// ./qtwidgets_basic -style Breeze
// ./qtwidgets_basic -style Oxygen

// This one doesn't:
// ./qtwidgets_basic -style Fusion

class MyWidget : public QWidget {
public:
  void paintEvent(QPaintEvent *ev) override {
    QPainter p(this);

    QStyleOptionDockWidget titleOpt;
    titleOpt.initFrom(this);
    titleOpt.title = "&My Title";

    style()->drawControl(QStyle::CE_DockWidgetTitle, &titleOpt, &p, this);
  }
};

int main(int argc, char **argv) {
  QApplication app(argc, argv);

  qDebug() << QStyleFactory::keys();

  MyWidget window;

  window.show();

  return app.exec();
}

@GitMensch
Copy link
Contributor Author

GitMensch commented Mar 7, 2023

Thank you very much for inspecting this - I assume that is specific to (some) QT_QPA_PLATFORM?
Any clue if this is QT version specific?

Note: even after installing kde-style-breeze kwin-style-breeze -style Breeze raised a warning:

QApplication: invalid style override 'Breeze' passed, ignoring it.

... is this possibly an AppImage problem (= do the additional styles need to be included there)?

@lievenhey lievenhey added the upstream bug in third party dependencies / libraries label Mar 8, 2023
@iamsergio
Copy link

It's specific to style, and not to QPA. I expect the same problem in all platforms where fusion is used.

No idea about AppImage, but that's plausible

@GitMensch
Copy link
Contributor Author

Just a note, while waiting on possibly more styles to test with the appimage to have a workaround: This can also be produced with kcachegrind, so is totally a QT style issue.

Default style (same for -style Windows) -style Breeze
default breeze

Can someone point me to the right issue tracker to report this "upstream" - or even better - to an existing ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream bug in third party dependencies / libraries
Projects
None yet
Development

No branches or pull requests

4 participants