wip
This commit is contained in:
@@ -64,18 +64,26 @@ int main(int argc, char *argv[]) {
|
|||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
QTextEdit *outputDisplay = new QTextEdit;
|
||||||
|
outputDisplay->setFont(QFont("Consolas", 32));
|
||||||
|
outputDisplay->setReadOnly(true);
|
||||||
|
outputDisplay->setFixedSize(window.width(), window.height() - (titleLabel ? 150 : 0));
|
||||||
|
outputDisplay->setStyleSheet("color: white; background-color: black;");
|
||||||
|
outputDisplay->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // Hide the vertical scrollbar
|
||||||
|
layout->addWidget(outputDisplay);
|
||||||
|
|
||||||
// QString url = args.first();
|
// QString url = args.first();
|
||||||
// web_view->load(QUrl(argv[1]));
|
// web_view->load(QUrl(argv[1]));
|
||||||
// layout->addWidget(web_view);
|
// layout->addWidget(web_view);
|
||||||
|
|
||||||
// Set a timer to change the background color and load the URL after 0.5 seconds
|
// // Set a timer to change the background color and load the URL after 0.5 seconds
|
||||||
QTimer::singleShot(500, [&]() {
|
// QTimer::singleShot(500, [&]() {
|
||||||
QWebEngineView *web_view = new QWebEngineView();
|
// QWebEngineView *web_view = new QWebEngineView();
|
||||||
window.setStyleSheet(""); // Remove the blue background
|
// window.setStyleSheet(""); // Remove the blue background
|
||||||
web_view->load(QUrl(args.first())); // Load the URL
|
// web_view->load(QUrl(args.first())); // Load the URL
|
||||||
layout->addWidget(web_view); // Add the web view to the layout
|
// layout->addWidget(web_view); // Add the web view to the layout
|
||||||
window.update(); // Refresh window to apply changes
|
// window.update(); // Refresh window to apply changes
|
||||||
});
|
// });
|
||||||
|
|
||||||
// window.showFullScreen();
|
// window.showFullScreen();
|
||||||
window.show();
|
window.show();
|
||||||
|
|||||||
Reference in New Issue
Block a user