0

qt dockable widget

I cannot seem to get the example pysidedock to dock with RV window, is there a special trick to it?

How do you make a package widget docked by default at startup?

Running linux

Thank you!




pysidedock-1.0.rvpkg

15 条评论

  • 0
    Avatar
    Jon Morley

    Hi Mini Duck,

    Can you please share with me the example you are referring to? I will see if I can get it working and tell you my steps.

    Thanks,
    Jon

  • 0
    Avatar
    Johan
  • 0
    Avatar
    Jon Morley

    Ah,

    I am seeing that as well. I will dig in and see what is going on.

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Hi,

    It looks like PySide (unlike PyQt and MuQt) is incapable of determining the Qt inherited type from our custom widgets. This leads to an inaccessible QMainWindow which is needed to set up docking. While i continue to dig into the options with PySide could you please tell me if PyQt or MuQt would be viable alternative options for you?

    Thanks,
    Jon

  • 0
    Avatar
    Johan

    Thanks for investigating!

    We will try to get a pyqt build but it would be great having pyside support if able.

  • 0
    Avatar
    Jon Morley

    OK,

    Here is an example PyQt package.

    Thanks,
    Jon

  • 0
    Avatar
    Johan

    Thank you Jon

    That package is working great for us!

  • 0
    Avatar
    Johan

    Very minor, doesn't seem to be possible to forcing widgets(buttons etc) less than ~50.

    in your example try button.setMaximumWidth(20)

  • 0
    Avatar
    Michael Kessler

    You'll find because RV is setting these parameters with styleSheets, the direct functions will sometimes be overridden.  In the case I've seen, the min-width is set to 3em for QPushButton.

     

    That being said, you should be able to set a stylesheet for a specific button to re-set the min-width as you see fit.

    If you want it set to pixels, you can do something like such:

    someStyleSheet =  """QPushButton { min-width: 10px; }"""
    someButton.setStyleSheet(someStyleSheet)

  • 0
    Avatar
    Johan

    Ah thanks for your help Michael, that makes sense.

  • 0
    Avatar
    Johan

    Hi

    With the new pyside support in RV - is it possible to get docked windows working?
    Cannot get it to work on my side

    Thank you

  • 0
    Avatar
    Michael Kessler

    This page has been updated with an example that gets you the main window to dock.  Most notably the difference is you need to wrap the instance with shiboken since doing object searches in PySide don't return you the specifically typed objects (despite responding properly to inherits()).
    https://support.shotgunsoftware.com/entries/96056447

    Note that PySide has it's own quirks that aren't mentioned in PyQt to PySide transition documents; so it might take a bit of working from the injection point forward if you are transitioning an existing project.

  • 0
    Avatar
    Jon Morley

    Hi,

    With the notes from this forum page...

    https://support.shotgunsoftware.com/entries/96056447

    I was able to get docking working in the example package. I am attaching the latest here.

    Thanks,
    Jon

     

    Attached at the top of the page in original post now

  • 0
    Avatar
    Jon Morley

    Haha! Just missed Michael's comment! So close...

  • 0
    Avatar
    Johan

    Thanks guys, that solved it

请先登录再写评论。