⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 qt-x11-free-3.0.3.tar.gz minigui图形界面工具
💻
字号:
-----------------------------------------------------------------------UPDATE: From version 5.0 onwards, the Qt OpenGL Extension includesdirect support for use of OpenGL overlays. For many uses of overlays,this makes the technique described below redundant. See the 'overlay'example program. The following is a discussion on how to use non-QGLwidgets in overlay planes.-----------------------------------------------------------------------Overlayrubber: An example program showing how to use Qt and Qt OpenGLExtension with X11 overlay visuals.(Background information for this example can be found in the file README.X11-OVERLAYS)The example program has three main parts:GearWidget - a normal, simple QGLWidget; renders the usualgears. Modified so that it will print a debug message everytime itredraws (renders) itself. Thus, you can eaily confirm that drawing inthe overlay plane does not cause redrawings in the main plane wherethe QGLWidget resides.RubberbandWidget: Very simple standard (non-GL) Qt widget thatimplements rubberband drawing. Designed for use in an overlayplane. It takes the planes' transparent color as a constructorargument and uses that for its background color. Thus, the widgetitself will be invisible, only the rubberbands it draws will bevisible.main.cpp: Creates a GearWidget and a Rubberbandwidget and puts thelatter on top of the former. Contains a routine that checks that thedefault visual is in an overlay plane, and returns the transparentcolor of that plane.Running it:-----------Start the overlayrubber executable. Click and drag with the left mousebutton to see rubberband drawing. Observere that the QGLWidget doesnot redraw itself (no redraw debug messages are output), still theimage is not destroyed. Marvel at the coolness of X11 overlays!Using this technique in a real application------------------------------------------For clarity, this example program has been kept very simple. Here aresome hints for real application usage:All normal widgets is in the overlay plane: This means that you canput all kinds of Qt widgets (your own or provided with Qt) on top ofthe OpenGL image (widget), e.g. pushbuttons etc., and they can bemoved, resized, or removed without destroying the OpenGL image.Using together with geometry management: The QLayout classes will notallow you to put one widget (the overlay) on top of another (theOpenGL widget); that would defy the whole purpose of the automaticlayout. The solution is to add just one of them to the QLayout object.Have it keep a pointer to the other (i.e. the QGLWidget knows aboutits overlay widget or vice versa). Implement the resizeEvent() methodof the widget you put in the layout, and make it call setGeometry() onthe other widget with its own geometry as parameters, thus keeping thetwo widgets' geometries synchronized.Using together with QPalette and QColorGroup: In stead of the somewhatsimplistic setBackgroundColor( transparentColor ), you can use Qt'sQPalette system for having your overlay widgets use transparent colorfor what you want. This way, the normal Qt widgets can be used asoverlays for fancy effects, just create a palette for them with thetransparent color for the wanted color roles, e.g. Background andBase, in the Normal and/or Active modes. This way, you can createsee-through QPushButtons etc.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -