社区
Qt
帖子详情
GraphicsView的ScrollBar怎么屏蔽掉
linux
2011-04-06 11:30:40
在有SCrollBar的时候设置setScrollBarPolicy可以隐藏,但是我想让他失去作用,setEnable在隐藏之后用不好使,可能是内部机制问题。 应该怎么才能把ScrollBar屏蔽掉呢?
...全文
118
2
打赏
收藏
GraphicsView的ScrollBar怎么屏蔽掉
在有SCrollBar的时候设置setScrollBarPolicy可以隐藏,但是我想让他失去作用,setEnable在隐藏之后用不好使,可能是内部机制问题。 应该怎么才能把ScrollBar屏蔽掉呢?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
linux
2011-04-07
打赏
举报
回复
这个方法我样了, void QAbstractScrollArea::setHorizontalScrollBar ( QScrollBar * scrollBar ) 不知道为什么不起作用,难道需要重写ScrollBar类,屏蔽掉按键的功能么。
这样太麻烦了啊
zhh_kv
2011-04-07
打赏
举报
回复
如果setScrollBarPolicy将bar隐藏不能达到你想要的效果,可以使用
void QAbstractScrollArea::setHorizontalScrollBar ( QScrollBar * scrollBar )
和 void QAbstractScrollArea::setVerticalScrollBar ( QScrollBar * scrollBar ) 试试看。
(QGraphicsView的父类是QAbstractScrollArea)
Python 2.6
Graphics
Cookbook.pdf
Preface 1 Chapter 1: Start your Engines 5 Introduction 5 Running a shortest Python program 6 Ensuring that the Python modules are present 7 A basic Tkinter program 9 Make a compiled executable under Windows and Linux 11 Chapter 2: Drawing Fundamental Shapes 15 Introduction 16 A straight line and the coordinate system 17 Draw a dashed line 18 Lines of varying styles with arrows and endcaps 20 A two segment line with a sharp bend 22 A line with a curved bend 23 Drawing intricate shapes – the curly vine 24 Draw a rectangle 27 Draw overlapping rectangles 28 Draw concentric squares 30 A circle from an oval 32 A circle from an arc 34 Three arc ellipses 35 Polygons 36 A star polygon 37 Cloning and resizing stars 39 Chapter 3: Handling Text 43 Introduction 43 Simple text 43 ii Table of Contents Text font type, size, and color 45 Alignment of text – left and right justify 49 All the fonts available on your computer 54 Chapter 4: Animation Principles 57 Introduction 57 Static shifting of a ball 58 Time-controlled shifting of a ball 59 Complete animation using draw-move-pause-erase cycles 62 More than one moving object 63 A ball that bounces 65 Bouncing in a gravity field 67 Precise collisions using floating point numbers 70 Trajectory tracing and ball-to-ball collisions 72 Rotating line 76 Trajectory tracing on multiple line rotations 78 A rose for you 82 Chapter 5: The Magic of Color 85 Introduction 85 A limited palette of named colors 86 Nine ways of specifying color 90 A red beachball of varying hue 91 A red color wedge of graded hue 94 Newton's grand wheel of color mixing 96 The numerical color mixing matching palette 101 The animated graded color wheel 106 Tkinter's own color picker-mixer 110 Chapter 6: Working with Pictures 113 Opening an image file and discovering its attributes 114 Open,
view
, and save an image in a different file format 117 Image format conversion for JPEG, PNG, TIFF, GIF, BMP 118 Image rotation in the plane of the image 120 Image size alteration 121 Correct proportion image resizing 123 Separating one color band in an image 124 Red, green, and blue color alteration in images 125 Slider controlled color manipulation 127 Combining images by blending 130 Blending images by varying percentages 131 Make a composite image using a mask image 132 iii Table of Contents Offset (roll) image horizontally and vertically 134 Flip horizontally, vertically, and rotate 134 Filter effects: blur, sharpen, contrast, and so on 135 Chapter 7: Combining Raster and Vector Pictures 139 Simple animation of a GIF beach ball 140 The vector walking creature 141 Bird with shoes walking in the Karroo 145 Making GIF images with transparent backgrounds using GIMP 149 Diplomat walking at the palace 152 Spider in the forest 156 Moving band of images 160 Continuous band of images 162 Endless background 164 Chapter 8: Data In and Data Out 167 Introduction 167 Creation of a new file on a hard drive 168 Writing data to a newly-created file 169 Writing data to multiple files 169 Adding data to existing files 170 Saving a Tkinter-drawing shape to disk 171 Retrieving Python data from disk storage 172 Simple mouse input 173 Storing and retrieving a mouse-drawn shape 174 A mouse-line editor 177 All possible mouse actions 181 Chapter 9: Exchanging Inkscape SVG Drawings with Tkinter Shapes 185 Introduction 185 The structure of an SVG drawing 186 Tracing the shape of an image in Inkscape 189 Converting an SVG path into a Tkinter Line 194 Chapter 10: GUI Construction: Part 1 199 Introduction 199 Widget configuration – a label 200 Button focus 201 The simplest push button with validation 203 A data entry box 204 Colored button causing a message pop-up 207 Complex interaction between buttons 208 Images on buttons and button packing 211 iv Table of Contents Grid Geometry Manager and button arrays 213 Drop-down menus to select from a list 215 Listbox variable selection 216 Text in a window 218 Chapter 11: GUI Construction: Part 2 219 Introduction 219 The Grid Layout Geometry Manager 220 The Pack Geometry Manager 222 Radiobuttons to select one from many 223 Checkbuttons (Tickboxes) to select some of many 224 Key-stroke event handling 226
Scrollbar
227 Custom DIY controller widgets 228 Organizing widgets inside frames 232 Appendix: Quick tips for running Python programs in Microsoft Windows 235 Running Python programs in Microsoft Windows 235 Where will we find the windows installer? 235 Do we have to use Python version 2.7? 236 Why do we get "python is not recognized…"? 236 Index 239 Preface Python 2.6
Graphics
Cookbook is a collection of straightforward recipes and illustrative screenshots for creating and animating graphic objects using the Python language. This book makes the process of developing
graphics
interesting and entertaining by working in a graphic workspace, without the burden of mastering complicated language definitions and opaque examples. What this book covers Chapter 1, Start your Engines: This chapter explains how to acquire and install the Python interpreter, for MS Windows or Linux as well as how to verify that Python is correctly installed. This chapter explains how to create complete working programs that can be run on client computers that do not have Python installed. Chapter 2, Drawing Fundamental Shapes: This shows how to create all the fundamental graphic elements including lines, circles, ovals, rectangles, polygons, and complex curves. Simple examples are provided to demonstrate how to draw the elementary shapes. The examples also provide a ready for reference for later use. Chapter 3, Handling Text: This chapter demonstrates how to control font size, color, and position using any of the font typefaces installed on the specific operating system being used. A simple means of discovering and demonstrating all available fonts on the operating system is shown. Chapter 4, Animation Principles: This chapter starts with examples of simple sequences of a circle in different positions and systematically progresses to smoothly-moving animations of elastic balls bouncing inside a gravity field. Chapter 5, The Magic of Color: This chapter begins with the assembling of color palettes using color names recognizable to Python. The way colors are constructed using numbers to mix controlled amounts of red, green, and blue is explained. Tools for matching colors to any sample are constructed. This chapter demonstrates how to vary shadings of one color into another. Download from Wow! eBook Preface Chapter 6, Working with Pictures: This chapter reveals how to acquire and use the Python Imaging Library to manipulate photo images. It also shows methods of image format conversion, re-sizing, rotating, color transforming, and complex filtering. Chapter 7, Combining Vector and Raster Images: This chapter demonstrates the ways of combining animated vector
graphics
with photographic images to produce complex animations. Chapter 8, Data in and Data Out: This chapter starts with basic storing and retrieving of files to a hard drive and progresses to the construction of programs that are tools for creating, storing, and retrieving free-form shapes drawn using a mouse. Chapter 9, Exchanging Inkscape SVG Drawings with Tkinter Shapes: This chapter shows in detail how to use the Inkscape drawing tool to convert shapes traced from a photographic image into a sequence of points which reproduce the shape in Python. Once a line is expressed as a Python sequence, it can be transformed numerically in many ways. Chapter 10, GUI Construction: Part 1: This chapter provides basic examples of how to create buttons, data entry boxes, drop-down menus, list-boxes, and text labels. It also covers how to customize button appearance. Chapter 11, GUI Construction: Part 2: Here the Grid Layout Manager and the Pack Layout Manager are explained and demonstrated. Examples of radio buttons, check buttons,
scrollbar
s, frames, and keystroke event coding are given. It also shows how to construct widgets using graphic elements on a canvas. Appendix, Quick tips for running Python programs in Microsoft Windows: This gives explanations of how to overcome some of the difficulties a new python programmer might encounter when trying to use Python in Windows. What you need for this book To run the code in this book, the reader will need a Linux operating system or Microsoft Windows, and some way of downloading Python, the Python Imaging Library, and Inkscape from the internet. All these applications are free and open source. The code has been developed on Linux Ubuntu version 9.04, Microsoft Windows XP, and Windows 7. Who this book is for This book is for Python programmers wanting simple, clear examples of graphic programming using Python. The examples are aimed at anyone wanting to use graphic elements and images inside Python programs with the minimum of complexity. The intended reader ranges from scholars and teachers to engineers and technicians
Java 2 图形设计卷
包括卷1:AWT和卷2:SWING。是chm文档格式。
C# 自定义滚动条样式和多窗口切换
代码中有两个应用例子 1,实现自定义滚动条样式 2,多窗口切换
rx第三方控件
RX Library 2.75 =============== The Set of Native Delphi Components for Borland Delphi versions 1, 2, 3, 4 & 5 and Borland C++ Builder 1, 3 & 4. 100% Source Code. Last revision date Oct 12, 1999. PLEASE FOLLOW THE INSTRUCTIONS PROVIDED IN THE INSTALLATION SECTION! TABLE OF CONTENTS ----------------- Latest Changes Over
view
History License Agreement Installation Demonstration Programs Source Files Using GIF Images Copyright Notes NEW FOR VERSION 2.75 -------------------- Delphi 5.0 & C++Builder 4.0 Compatibility New components: TRxLoginDialog New properties, events: TFormPlacement.RegistryRoot TFormPlacement.Version TFontComboBox.UseFonts TRxDBGrid.OnTopLeftChanged TRxDBLookupCombo.DisplayValues TStrHolder.Macros, TStrHolder.OnExpandMacros RxSpin.TValueType.vtHex New routines, methods, constants: SaveClipboardToStream, LoadClipboardFromStream (clipmon.pas) AppFileName, AppVerInfo (rxverinf.pas) XorString, XorEncode, XorDecode (strutils.pas) BUG FIXES. Over
view
-------- RX Library contains a large number of components, objects and routines for Borland Delphi with full source code. This library is compatible with Borland Delphi 1, 2, 3, 4, 5 and Borland C++ Builder 1, 3, 4. This collection includes over 60 native Delphi components. RX Library is a freeware product. Feel free to distribute the library as long as all files are unmodified and kept together. The authors disclaim all warranties as to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. Use under your own responsibility, but comments (even critique) in English (or in Russian) are welcome. 1. Components: TRxDBLookupCombo provides an incremental search through lookup list by directly typing into the combo control while the lookup list is displayed, LookupSource can refer to TTable, TQuery, TRxQuery or TQBEQuery. It even incrementally searches on the query results and much more... TRx
RxLib控件包内含RxGIF,全部源码及DEMO
RX Library 2.75 with Delphi 2009 support (by Flex
Graphics
software) ====================================================================== The Set of Native Delphi Components for Borland Delphi versions 1, 2, 3, 4, 5, 6, 7, 2005, 2006, 2009 and Borland C++ Builder 1, 3, 4, 5, 6, 2006 & 2009. 100% Source Code. Last revision date Oct 12, 1999. PLEASE FOLLOW THE INSTRUCTIONS PROVIDED IN THE INSTALLATION SECTION! TABLE OF CONTENTS ----------------- Latest Changes Over
view
History License Agreement Installation Demonstration Programs Source Files Using GIF Images Copyright Notes NEW FOR VERSION 2.75 -------------------- Delphi 5.0 & C++Builder 4.0 Compatibility New components: TRxLoginDialog New properties, events: TFormPlacement.RegistryRoot TFormPlacement.Version TFontComboBox.UseFonts TRxDBGrid.OnTopLeftChanged TRxDBLookupCombo.DisplayValues TStrHolder.Macros, TStrHolder.OnExpandMacros RxSpin.TValueType.vtHex New routines, methods, constants: SaveClipboardToStream, LoadClipboardFromStream (clipmon.pas) AppFileName, AppVerInfo (rxverinf.pas) XorString, XorEncode, XorDecode (strutils.pas) BUG FIXES. Over
view
-------- This version is the result of long unactivity of RX Library authors and some imperfections and bugs of other RX adaptations to Delphi 6. The authors of this version disclaim all warranties as to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. Use under your own responsibility, but comments (even critique) in English (or in Russian) are welcome. RX Library contains a large number of components, objects and routines for Borland Delphi with full source code. This library is compatible with Borland Delphi 1, 2, 3, 4, 5, 6 and Borland C++ Builder 1, 3, 4. This collection includes over 60 native Delphi components. RX Library is a freeware product. Feel free to distribute the library as long as all files are unmodified and kep
Qt
16,818
社区成员
26,684
社区内容
发帖
与我相关
我的任务
Qt
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
复制链接
扫一扫
分享
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章