QtDesigner Animate Containers with the Expander Plugin

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2024

ความคิดเห็น • 12

  • @MrFleischFloete
    @MrFleischFloete ปีที่แล้ว

    Great work that you did there! Im just wondering: Is there a way to make it expand in another direction? I dont see any suitable properties for that?

    • @MadPonyInteractive
      @MadPonyInteractive  ปีที่แล้ว

      The direction will depend on the layout it is in.
      For example if you want it to expand to the left, you make its parent element have a Horizontal layout, and place other elements on its left.
      Hope that helps.

    • @MrFleischFloete
      @MrFleischFloete ปีที่แล้ว

      @@MadPonyInteractive Thank you :-) I have another problem: I want to use it on screens with different resolutions. So what i usually do is to put everything in the layout set layoutStrech to something like [1,4,1] (for three elements in the layout) but the expander seems to ignore that. Is there a way to set it up using QtDesigner already. I would like to avoid the overhead of having to fetch the screenresolution and set the parameter aminTo programatically..
      Another suggestion: I would like to change is the default for animateonhover: When i hover in QtDesigner the Hover movement consists of a multitude of steps in QtDesigner effectively disabling our ability to Ctrl+Z thats why I like it to be disabled by default. Maybe it would be better to make this the overall standard.

    • @MadPonyInteractive
      @MadPonyInteractive  ปีที่แล้ว

      @@MrFleischFloete Thank you for the suggestions, I took a note of them and will try to implement them on future versions.

  • @havlhack2877
    @havlhack2877 2 ปีที่แล้ว

    how i can add Expander to QT designer

    • @MadPonyInteractive
      @MadPonyInteractive  2 ปีที่แล้ว

      You will need to install MadQt and at least import it in a python environment, here's the instructions: madponyinteractive.github.io/MadQt/get-started.html
      Check the Unlocking QtDesigner Plugins section

    • @EdwinFairchild
      @EdwinFairchild 2 ปีที่แล้ว

      @@MadPonyInteractive "Importing MadQt or any module from it " what do you mean importing from "it" I can import a module inside designer? I am not sure where?

    • @MadPonyInteractive
      @MadPonyInteractive  2 ปีที่แล้ว

      @@EdwinFairchild I mean in code. run a python file with an `import MadQt` statement in it and it will add the necessary environment variables

    • @EdwinFairchild
      @EdwinFairchild 2 ปีที่แล้ว +1

      @@MadPonyInteractive Hey thank you for the reply!!!.... check your git hub I have been posting some of my issues. I am now giving it a shot on windows but still encounter some problems. I am so excited to use this plug-in been trying since last night

  • @MrFleischFloete
    @MrFleischFloete ปีที่แล้ว

    Its me again 😀 I have a problem: I can manage the Expander plugin to accept my outer containers size only when im expanding horizontally. When i use the expander in a vertical Layout (so i want it to expand vertically) it aways initializes with the width set at the parameter animateMaxWidth.
    Here's what i did
    I set animateMaxWidth (+Min) False and animateMaxHeight (+Min) to True. Also i set animFrom Width to 100 and also animTo. (Ignored when the same value?). Then I set QWidget.maximumSize Width to 9999999999. In QtDesigner it then behaves as i expect it: The exander stretches to the window size and looks *exactly* how i want it and also when I toggle setExpanded it behaves correctly, but once I open my Program it does not behave correctly and my Widget gets compressed to Width 100. Also then when I open QtDesigner I see QWidget.maximumSize Width reset to 100 (a hint?) Is this the bug or is there anything I did not understand correctly regarding Qt's layouts?

    • @MadPonyInteractive
      @MadPonyInteractive  ปีที่แล้ว

      The booleans at the bottom, animateMaxWidth, animateMinWidth, animateMaxHeight and animateMinHeight tell the expander what to animate. If animateMaxWidth is on, the expander will animate QWidget.maximumSize(Width) with the animFrom(Width) and animTo(Width) values.
      You can turn them all off and experiment with different layouts and size policies changing the QWidget.maximumSize and QWidget.minimumSize to see what happens, then you will know what you need to animate.
      If for example you dont care about animating with you will want to turn off animateMaxWidth and animateMinWidth and ignore animFrom(Width) and animTo(Width).
      Hope that helps

    • @MrFleischFloete
      @MrFleischFloete ปีที่แล้ว

      ​@@MadPonyInteractive
      It seems to me like this may be a bug because QWidget.maximumSize(Width) is set automatically by the Expander though animateMaxWidth and animateMinWidth is turned off. I have setup a minimum Example of my problem and uploaded it to github but it seem youtube wont let me upload the link here.. Its at git hub / derbengale / MinExampleExpanderBug. When i set it up using qt designer i set QWidget.maximumSize(Width) to a very large value and turn off to animate the width in QtDesigner everything works fine, until you open the file again. Then at the next start of QtDesigner the Width resets to animateMinWidth at the initialization. Note that when you open the ui file immediately QtDesigner marks the file as edited with a * in the title bar.