Cannot get QWebEngine to log to a remote console via port 9222.
Apparently QWebEngine is supposed to send debugging information, including console log messages to a remote debugger connected via http://localhost:9222.
After many tries we are unable to make this work.
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9222");
qputenv("QTWEBENGINE_REMOTE_ALLOW_ORIGINS", "*");
...
QLoggingCategory::setFilterRules(QStringLiteral("js=true\nqt.webengine.webchannel=true"));
...
class DebugWebEnginePage : public QWebEnginePage
{
Q_OBJECT
public:
explicit DebugWebEnginePage(QObject *parent = nullptr) : QWebEnginePage(parent) {}
// NOTE: NOT overriding javaScriptConsoleMessage()
// so that console output goes to Chrome DevTools
};
int main(int argc, char *argv[])
{
// Step 1: Enable remote debugging BEFORE QApplication
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9222");
qputenv("QTWEBENGINE_REMOTE_ALLOW_ORIGINS", "*");
QApplication app(argc, argv);
// Step 2: Enable JavaScript console logging AFTER QApplication
QLoggingCategory::setFilterRules(QStringLiteral("js=true"));
// Step 3: Create the widget/window
MarkdownEditorWindow window;
window.show();
return app.exec();
}
What are we missing to make this work ?
Thanks
https://redd.it/1o8bkom
@qt_reddit
Apparently QWebEngine is supposed to send debugging information, including console log messages to a remote debugger connected via http://localhost:9222.
After many tries we are unable to make this work.
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9222");
qputenv("QTWEBENGINE_REMOTE_ALLOW_ORIGINS", "*");
...
QLoggingCategory::setFilterRules(QStringLiteral("js=true\nqt.webengine.webchannel=true"));
...
class DebugWebEnginePage : public QWebEnginePage
{
Q_OBJECT
public:
explicit DebugWebEnginePage(QObject *parent = nullptr) : QWebEnginePage(parent) {}
// NOTE: NOT overriding javaScriptConsoleMessage()
// so that console output goes to Chrome DevTools
};
int main(int argc, char *argv[])
{
// Step 1: Enable remote debugging BEFORE QApplication
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9222");
qputenv("QTWEBENGINE_REMOTE_ALLOW_ORIGINS", "*");
QApplication app(argc, argv);
// Step 2: Enable JavaScript console logging AFTER QApplication
QLoggingCategory::setFilterRules(QStringLiteral("js=true"));
// Step 3: Create the widget/window
MarkdownEditorWindow window;
window.show();
return app.exec();
}
What are we missing to make this work ?
Thanks
https://redd.it/1o8bkom
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
Qt career direction
Hello everyone, I would like to know which employment directions of Qt are relatively popular in your country or which Qt directions are there in your country, such as Qt audio and video direction or host computer direction. I would like to consult everyone's views and opinions. Thank you.
https://redd.it/1o8pak6
@qt_reddit
Hello everyone, I would like to know which employment directions of Qt are relatively popular in your country or which Qt directions are there in your country, such as Qt audio and video direction or host computer direction. I would like to consult everyone's views and opinions. Thank you.
https://redd.it/1o8pak6
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
Vertical Centering Counts Taskbar Size Too
This is my slot to resize and center window, but the vertical centering counts taskbar size which I want to exclude. Thanks
https://redd.it/1o8sw9h
@qt_reddit
void MainWindow::changeSize(QSize newSize){resize(newSize);QScreen *screen = QGuiApplication::primaryScreen();QRect available = screen->availableGeometry();int x = available.x() + (available.width() - width()) / 2;int y = available.y() + (available.height() - height()) / 2;move(x, y);}This is my slot to resize and center window, but the vertical centering counts taskbar size which I want to exclude. Thanks
https://redd.it/1o8sw9h
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
How do you see the future of Qt?
In terms of relevance, longevity, being disrupted etc.
For carreer wise.
https://redd.it/1o9pqe4
@qt_reddit
In terms of relevance, longevity, being disrupted etc.
For carreer wise.
https://redd.it/1o9pqe4
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
Qt C++
hi all, i am software developer with around 10 year of experience in C++ and Qt framework.
My current location is doha, qatar.
I am actively looking for opportunity in middle east, been trying to connect people on linked and other job portals but no luck so far.
Any suggestion for job hunting in middle east region is highly welcome.
https://redd.it/1oa7bhs
@qt_reddit
hi all, i am software developer with around 10 year of experience in C++ and Qt framework.
My current location is doha, qatar.
I am actively looking for opportunity in middle east, been trying to connect people on linked and other job portals but no luck so far.
Any suggestion for job hunting in middle east region is highly welcome.
https://redd.it/1oa7bhs
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
This media is not supported in your browser
VIEW IN TELEGRAM
I wrote Van Gogh filter tool in my free engine - 3Vial OS [Python / PySide6 (Widgets) / PyOpenGL]
https://redd.it/1oarow5
@qt_reddit
https://redd.it/1oarow5
@qt_reddit
Text Selection and copy, paste, cut not working for mobile or touch devices
I had this on my project, the selection of text works nicely on desktop, but some reason it is not working for mobile device.
How does one applies text selection, of copy,paste,cut on a text.
https://redd.it/1ob81x1
@qt_reddit
Note: This TEXTEDIT is inside flickableTextEdit {id: txttext: "sometext... long paragraph"font: "somefont"color: blackwrapMode: Text.WordWrapreadOnly: trueselectByMouse: trueselectByKeyboard: trueselectionColor: "light bluewidth: parent.width}ScrollBar.vertical: ScrollBar { }}I had this on my project, the selection of text works nicely on desktop, but some reason it is not working for mobile device.
How does one applies text selection, of copy,paste,cut on a text.
https://redd.it/1ob81x1
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
stuck in Qt VS Tools Version 3.4.1: initializing
My VS version is vs2022, Version 17.7.4
the Qt framework in use is 6.5.4
I have tried re-install, adding PATH, restart.
Fail Log from C:\/Users\/\[Username\\/AppData\/Roaming\/Microsoft\/VisualStudio\/17.0_f94f54c7\/ActivityLog.xml](https://preview.redd.it/g76ahtp5epwf1.png?width=1117&format=png&auto=webp&s=55bc5a7255e783a2b2d1860d487116a38fb538c1)
Always stuck here, reason unknown...
https://redd.it/1odfu8a
@qt_reddit
My VS version is vs2022, Version 17.7.4
the Qt framework in use is 6.5.4
I have tried re-install, adding PATH, restart.
Fail Log from C:\/Users\/\[Username\\/AppData\/Roaming\/Microsoft\/VisualStudio\/17.0_f94f54c7\/ActivityLog.xml](https://preview.redd.it/g76ahtp5epwf1.png?width=1117&format=png&auto=webp&s=55bc5a7255e783a2b2d1860d487116a38fb538c1)
Always stuck here, reason unknown...
https://redd.it/1odfu8a
@qt_reddit
i am developing an qt desktop application. i have already developed the ui module that interact with user and get details for the application. so now i need to implement the core backend i need the it as a seperate module. how can i communicate or pass data between ui module and the backend module.
https://redd.it/1od07v0
@qt_reddit
https://redd.it/1od07v0
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
Popup w/ Listview does not scroll...
Title says it all
just ported an app from Qt 5 to Qt 6 was working fine in qt5
I have a popup modal with a listview inside it that will not scroll i can flick it with the mouse, but will not scroll with the mouse wheel...
i tested by removing the popup and just put under an Item and it works fine
also tried putting the listview delegate/logic inside the parent window of the popup, no luck
any suggestions
thanks
https://redd.it/1oen2a4
@qt_reddit
Title says it all
just ported an app from Qt 5 to Qt 6 was working fine in qt5
I have a popup modal with a listview inside it that will not scroll i can flick it with the mouse, but will not scroll with the mouse wheel...
i tested by removing the popup and just put under an Item and it works fine
also tried putting the listview delegate/logic inside the parent window of the popup, no luck
any suggestions
thanks
https://redd.it/1oen2a4
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
Tasket++ — simple Windows tool to automate user actions, free and open source
https://redd.it/1ogk3l0
@qt_reddit
https://redd.it/1ogk3l0
@qt_reddit
Reddit
From the QtFramework community on Reddit: Tasket++ — simple Windows tool to automate user actions, free and open source
Explore this post and more from the QtFramework community
IPC in qt
i am developing an desktop application i need to implement inter process communication using shared memory in the application. i need this for the ui and backend communication. can anyone explain how this is done in qt
https://redd.it/1oh4r72
@qt_reddit
i am developing an desktop application i need to implement inter process communication using shared memory in the application. i need this for the ui and backend communication. can anyone explain how this is done in qt
https://redd.it/1oh4r72
@qt_reddit
Reddit
From the QtFramework community on Reddit
Explore this post and more from the QtFramework community
