Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8145459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:40:06+00:00 2026-06-06T13:40:06+00:00

Is there any curve control in pyqt?, I have attached a image which is

  • 0

Is there any curve control in pyqt?, I have attached a image which is based on maya gradientControl. I am looking some thing similar with pyqt where I want to edit the curve and each edit should trigger some signal.Right now I can use sip and I can wrap maya gradientControl in to my pyqt window but its really not working as expected. Here is the code what I am trying. Its just a QWidget so its very hard to find what happening when I am adding a point on curve .

import os
import maya.cmds as cmds
import maya.mel as mel
import maya.OpenMayaUI as mui
import sys
import sip
from PyQt4 import QtGui, QtCore, uic
baseUI = os.path.join(os.path.dirname(__file__), "range_ctrl.ui")
baseUIClass, baseUIWidget = uic.loadUiType(baseUI)

def getMayaWindow():
    windowPointer = mui.MQtUtil.mainWindow()
    return sip.wrapinstance(long(windowPointer), QtCore.QObject)

def convertToQT(controlName):
    controlPoniter = mui.MQtUtil.findControl(controlName)
    if controlPoniter is not None:
        return sip.wrapinstance(long(controlPoniter), QtCore.QObject)

class MayaRangeCtrl(baseUIWidget, baseUIClass):
    def __init__(self, parent=getMayaWindow()):
        super(baseUIWidget, self).__init__(parent)
        self.setupUi(self)
        self.setObjectName("mayaRangeCtrl")
        self.setWindowTitle("Range Control")
        self.p1_vbox = QtGui.QVBoxLayout(self.frame)
        self.range_ctr = cmds.gradientControlNoAttr( 'mayaaaa', h=90)
        mayaQTObj = convertToQT(self.range_ctr)
        self.p1_vbox.addWidget(mayaQTObj)
        self.setCentralWidget(self.frame)
        self.show()

def main():
    myWindow = MayaRangeCtrl()

def run():
    main()

And here is the screen capture.

enter image description here

And the ui contain a mian window and a QFrame with.
Here is the maya documentation

But I am looking some pure QT widgets or some idea how we can implement this. I tried with QPolygon but no idea how we can manipulate control point run time. any idea ?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:40:07+00:00Added an answer on June 6, 2026 at 1:40 pm

    Because the gradient control is written in the C++ side of the maya code, there is no public interface to it as a PyQt4 widget as you might have already discovered (and as far as I know).

    What sip will give you is a QWidget reference that lets you reparent and place it within your app as you desire. But as for working with it from there on, your best bet is to just connect up to the python commands callbacks for the gradient control

    cmds.gradientControlNoAttr(self.range_ctr, e=True, changeCommand=self.myCallback)
    

    If the available callbacks for the gradientControlNoAttr are not enough for you, then I am afraid you will have to roll your own custom widget using your own paint events (or using the QGraphics classes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any good free programs for curve fitting out there? I have MATLAB
Is there any ways around to find the index position of a curve, based
I am trying to fit smooth curve to my dataset; is there is any
The more control points on a Bézier curve the less near any given control
At present I have a control to which I need to add the facility
Is there any possibility to fit a curve to that histogram above in Matlab?
is there any way to access pixels along the specified curve/path in OpenCV? I've
Is there any web framework in C++ which is like Spring for Java, i
Is there any package that automatically fits a curve using many simple models? By
In a plot(x,y) is there any way to plot a line/curve/function that would split

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.