Comments (7)
Hi @sunpeishuai 不好意思很晚才看到这个issue。
这个问题不属于QCefView这个控件的issue,属于你的程序设计问题,我不推荐在CEF的显示区域上面放置控件或者窗口,如果可以请直接使用web实现你需要的功能,应为QCefView具备C++代码和JavaScript交互的能力。
祝好运 : )
如果没有更多问题,请顺手close掉这个issue。多谢。
from qcefview.
我也碰到相同的问题, 我想做一个 网页内容的搜索功能, 类似于这样,
有没有可行的办法解决遮挡的问题?
from qcefview.
@looksoo 这个功能是可以实现的,我所说的“不推荐在CEF显示区域上面放置控件或者窗口”意思是说不要给CEF添加子窗口或者控件。而你可以在实现的搜索浮动控件的时候让他属于外层窗口的子窗口,而不是CEF控件的子窗口,这样的话你可以把搜索窗口放置在任意位置。
from qcefview.
@tishion 感谢回复, 在外层窗口中添加子窗口, 界面会被Web页面遮挡, 使用QStackLayout并设置为 stackAll, 也同样不能解决遮挡的问题;
from qcefview.
@looksoo 如果你所说的子窗口是指QT中的child的话,确实是无法实现的,因为QT是direct UI,所以他所有的child widget的绘制都是其顶层窗口负责,所以我们说QT的子窗口其实只是从绘制层面划分出来的。而CEF本身的窗口是windows的真窗口,是浮在其父窗口(QT窗口之上的),所以你可以把搜索窗口转换成native 窗口,具体做法只要调用一下他的winId() 即可转换成native窗口。
对于Qt和Native窗口的混合编程问题:
1.加深对QT的绘制体系和windows窗口的绘制体系的理解,
2.多使用 Spy++观察一下窗口层次关系
基本就能解决所有问题了。
from qcefview.
@tishion 非常感谢!
from qcefview.
@looksoo 你好,你问题有解决吗?我也遇到类似需求,有一个窗体需要浮在Qcefview上层,和QCefVie同父窗体,显示位置通过主窗或者父窗口进行设置坐标大小,希望得到的效果是跟随主窗口一起显示隐藏,移动,缩放,目前做法是子窗设置setWindowFlags(windowFlags() | Qt::Tool | Qt::FramelessWindowHint);但是这样就相当于脱离主窗体,他的上层是电脑桌面了,移动缩放关闭等都不受控制,不知有没有比较好的解决方法
from qcefview.
Related Issues (20)
- 你好,我现在遇到一个mp4的播放问题,cef是支持mp4的,QCefViewTest却不能正常播放 HOT 7
- 无法设置窗口置顶 HOT 1
- 内存释放奔溃问题 HOT 1
- 窗口点击关闭后进程并未退出 HOT 2
- 维护问题 HOT 1
- 我下载的cef版本是cef_binary_86.0.21+g6a2c8e7+chromium-86.0.4240.183_windows64,其中CefFrame中没有LoadString这个函数,导致QCefView编译失败,请问这个函数应该用什么替代呢? HOT 4
- Is linux supported? HOT 1
- CMAKE comfile error HOT 1
- Compile Error: API Deprecated HOT 1
- [Question] Is Off Screen Render supported? HOT 2
- Compile error HOT 3
- Any plan to open ALL CEF settings to user?
- windows版的源码能直接拿到MacOs去使用XCode编译?
- The QCefView window is blank after starting the client
- missing file CefViewBrowserApp/QCefViewDelegate.h HOT 1
- The way to support virtual keyboard in win10 HOT 2
- QT使用的时候如果把窗口隐藏再显示出来内容都不见了
- delete QCefView 后再次使用crash HOT 2
- 偶现broadcastEvent 后, web接收不到消息
- delete QCefView 后再次new 程序退出
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qcefview.