1 设置无边框
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);
问题:导致窗体不刷新了。
解决:重写【showEvent】方法
void showEvent(QShowEvent *event)
{
this->setAttribute(Qt::WA_Mapped);
QWidget::showEvent(event);
}
2. 键盘事件
Qt::Key_Return 大键盘Enter Qt::Key_Enter 小键盘Enter
3. opencv ,videoPanel显示视频
禁止videoPanel控件内重绘:
ui.videoPanel->setUpdatesEnabled(false);
4. QColorDialog 中英文翻译
【Cursor at %1, %2 Press ESC to cancel】不显示中文
项目右键执行qmake,然后重新构建。