python - Pyqt4: Use of Marker Numbers in Qscintilla -


i want know why marker number used , how 1 31 marker numbers different each other. , how add custom marker symbol gradient,pix map or image etc example these blue glittery dots in given image.:-
margin design pyqt4

marker defined in following code:-

 circle_marker_num = 0 ...... def __init__(self, parent=none):    super(simplepythoneditor, self).__init__(parent)    self.markerdefine(qsciscintilla.circle,self.circle_marker_num)    self.setmarkerbackgroundcolor(qcolor(66, 66, 255),self.circle_marker_num)    ......  def on_margin_clicked(self, nmargin, nline, modifiers):     # toggle marker line margin clicked on     if self.markersatline(nline) != 0:         self.markerdelete(nline, self.circle_marker_num)     else:         self.markeradd(nline, self.circle_marker_num) 

the answer question "why marker number used" simply: why not? sort of identifier has used, , number seems reasonable choice.

the markers have pre-defined meaning numbers 25 31, used fold-margin symbols. numbers 0-24 have no pre-defined meaning, can use them in way like. , in fact, if don't use folding, can use 32 markers in way like.

you can define pixmap, image, or text character symbol use marker. like:

    pixmap = qtgui.qpixmap('image.png')     self.markerdefine(pixmap, self.circle_marker_num) 

and other variants work in similar fashion.

ps:

you have answered points (and more) in question consulting excellent documentation available:


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -