Skip to content

js: Uncaught ReferenceError: alphaTab is not defined #1264

Answered by Danielku15
brusand asked this question in Q&A
Discussion options

You must be logged in to vote

I moved this bug to the discussions because there is no bug directly in alphaTab but you are using it likely not yet correct.

The problem is your web view in this case which is too restrictive. Set the following environment variable and then launch your application: QTWEBENGINE_REMOTE_DEBUGGING=4444 then you can open in a normal browser http://localhost:4444 to get the developer tools open for your app.

And then you can see that the web view blocks loading the data from the urls making alphaTab unavailable.

You need to enable certain features in your web view:

        self.webview.settings().setAttribute(QWebEngineSettings.LocalContentCanAccessRemoteUrls, True)

https://doc.qt.io/qtforpyt…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@brusand
Comment options

Answer selected by Danielku15
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
state-needs-triage Bug not triaged yet.
2 participants
Converted from issue

This discussion was converted from issue #1258 on September 09, 2023 08:50.