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

Widget picking does not seems to work (Ubuntu 20.04) #23

Open
kannes opened this issue May 30, 2022 · 2 comments
Open

Widget picking does not seems to work (Ubuntu 20.04) #23

kannes opened this issue May 30, 2022 · 2 comments

Comments

@kannes
Copy link

kannes commented May 30, 2022

I compiled this great tool on Ubuntu 20.04. Tried both with and without -DUSE_QT5=True.
I launch it as root as otherwise I got errors that it could not connect the process to inspect.

When I click the Pick Widget button:

  • The inspector GUI becomes unresponsive (as expected)
  • Click somewhere in the target app
  • ... nothing happens

I expected the inspector finding the clicked widget in its tree and selecting it.

@robertknight robertknight changed the title Widget picking does not seems to work Widget picking does not seems to work (Ubuntu 20.04) May 30, 2022
@robertknight
Copy link
Owner

I launch it as root as otherwise I got errors that it could not connect the process to inspect.

Did you try both the ./qtinspector <pid> and ./qtinspector <program name> <arguments> methods of invoking the tool? If not, can you try both variations as a non-root user and post details of the errors you get.

My current development laptop is a Mac and I haven't tested this tool on Ubuntu recently. It is possible some platform security changes or changes in Qt itself might require changes in how this tool connects to the target process. The tool should be compiled using the same version of Qt as the application that you want to connect to.

@kannes
Copy link
Author

kannes commented May 30, 2022

Thanks for your interest, I highly appreciate it! :)

Testing on Arch gives me the same issues so maybe it is just modern Linux.

I installed qtinspector via the PKGBUILD https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qt-inspector-qt5-git so it is QT5.

For testing again I used the PDF reader Okular (says "Qt Version 5.15.4 (built against 5.15.3)").

Immediately after launching with qtinspector okular:
image

I click "Pick Widget", the mouse cursor becomes a hand if I hover anything in the Okular window. If I click something the qtinspector window does either a) nothing if there was nothing selected in it before or b) clears its selection (right table becomes empty, no selection in the tree, no change in scroll position). Nothing is shown in the terminal.

Same behaviour if I run qtinspector okular as superuser.

On this system I cannot attach to a running process, regardless of user->user or superuser-qtinspector->user-okular:

Local socket state changed QLocalSocket::ConnectingState
Local socket reported error QLocalSocket::ServerNotFoundError
Local socket state changed QLocalSocket::UnconnectedState
Failed to connect to local socket server in target process 12345
Failed to inject helper library into process <pid>
Failed to send top-level widget request fetch to child process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants