qcolordialog - How do I set custom colours on a pyqt QCoiorDialog? -


i bringing qcolordialog so:-

colour = qtgui.qcolordialog.getcolor() 

what want know how set colours of custom color swatches before bring dialog? have searched lot , found method setcustomcolor() can't work. repeatedly tells me

typeerror: argument 2 of qcolordialog.setcustomcolor() has invalid type 

i have tried manner of variations of how create qcolor, never seems happy it.this trying:-

mycolor = qtgui.qcolor(0,0,0,0) colour = qtgui.qcolordialog.setcustomcolor(0,mycolor) 

but still gives me same 'invalid type' error...

any ideas?

all need is:

colour_dia = qtgui.qcolordialog() mycolour = qtgui.qcolor(0, 0, 0, 0).rgba()  #this needs integer value colour colour_dia.setcustomcolor(0, mycolour)  selected_colour = colour_dia.getcolor() 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -