for studying by self about Qt
- QCefView (here qcview): https://github.com/tishion/QCefView -> qcview
- CefViewCore: https://github.com/CefView/CefViewCore ..
- Qt_tutorial, qcview ..
- actually, it is not a tutorial.. bad naming on project
// see Qt_tutorial/mainwindow.h
class MainWindow {
...
private slots:
void closeWindow();
void minimizeWindow();
...
}
// see Qt_tutorial/mainwindow.cpp
MainWindow::MainWindow {
...
// MainWindow settings
this->setWindowFlags(Qt::CustomizeWindowHint);
this->setWindowFlags(Qt::FramelessWindowHint);
// cotrolFrame's elements settings
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(closeWindow()));
connect(ui->minimizeButton, SIGNAL(clicked()), this, SLOT(minimizeWindow()));
...
}
- Signal and Slots in Qt
- make window different like
FramelessWindow
- inspired "just do it your project"
- my custom view not showing ..? why?
// see QtProject01/main_window.cpp
void MainWindow::initialize() {
connect(ui->changeMainWidgetColorBtn, &QPushButton::clicked, this,
[this](){
ui->mainWidget->setStyleSheet("background-color: red");
qDebug() << "MainWidget: " << ui->mainWidget->pos() << "CustomWidget: " << cw->pos();
}
);
}
class MainWindow {
private:
CustomView* cw; // std::unique_ptr<CustomView> cw // can be worked well
}
...
MainWindow::MainWindow() {
cw = new CustomWidget(ui->centralwidget); // look at the hierarchy of MainWindow
ui->gridLayout->addWidget(cw, 2, 2, 1, 1);
}