qt如何做出类ppt形式的缩略图

Edward802 2015-11-18 02:06:20
如何能够做一个界面的缩略图?
就是界面主要分为两个部分,左边是显示每一页具体的内容的缩略图,右边是一个qstackwidget类,存储每一页内容的样式,如何实时地把右边的stackwidget类里面的每一个widget变成缩略图形式放在左边排列出来,就像ppt那样的效果?求各大神相助,想了很久都没想到方法!~~~~
...全文
116 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
未狂 2015-11-18
  • 打赏
  • 举报
回复
假设你当前操作的QWidget *main; 用另一个QWidget *p指向main 然后在用这个p放在略缩图模块上,再用一个透明的QPushButton*覆盖在这个p上,用以选中略缩图操作,也正好保证不会因为操作了p而改动了main
赵4老师 2015-11-18
  • 打赏
  • 举报
回复
PrintWindow The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC. BOOL PrintWindow( HWND hwnd, // Window to copy HDC hdcBlt, // HDC to print into UINT nFlags // Optional flags ); Parameters hwnd Handle to the window that will be copied. hdcBlt Handle to the device context. nFlags Specifies the drawing options. It can be one of the following values. Value Meaning PW_CLIENTONLY Only the client area of the window is copied to hdcBlt. By default, the entire window is copied. Return Values If the function succeeds, it returns a nonzero value. If the function fails, it returns zero. Remarks This function is similar to WM_PRINT. Before calling PrintWindow, first select a bitmap into hdcBlt. Requirements StretchBlt The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context. BOOL StretchBlt( HDC hdcDest, // handle to destination DC int nXOriginDest, // x-coord of destination upper-left corner int nYOriginDest, // y-coord of destination upper-left corner int nWidthDest, // width of destination rectangle int nHeightDest, // height of destination rectangle HDC hdcSrc, // handle to source DC int nXOriginSrc, // x-coord of source upper-left corner int nYOriginSrc, // y-coord of source upper-left corner int nWidthSrc, // width of source rectangle int nHeightSrc, // height of source rectangle DWORD dwRop // raster operation code );

64,281

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧