How to update height of QStandardItem/Delegate?
-
@StudentScripter can you explain what you mean by module ?
-
@SGaist One Dropdown section with all the widgets that are into such a dropdown.
So for example modul1/dropdown1:
-4 lineedits for width, height, posx, posymodul2/dropdown2:
-checkbox for hiding elements in the scene
-lineedit for setting the name of the item ins sceneand so on you get the point. :) Have a nice weekend.
-
@StudentScripter Did you consider having a "edit mode" where you move things around ?
-
@SGaist Preferabily i would like to not have an edit mode, if possible. But whats your idea with an edit mode?
Also if not using that. Would implementing drag and drop inside they layout be the way or is there any other better methode? Thank you very much.
-
@StudentScripter with the edit mode, you can make your widgets look a bit like a dashboard where you move things around a bit like on iOS when you long press on the screen and things start wobbling. You can then move them around and once it's done you can again use them.
As for your second question, it's rather at the containing widget level that you would do that. You would move things around in the layout but it's not the layout that is responsible for the D&D part as layouts do not have a "body".
-
@SGaist Yeah i primarily meant drag and drop within the qscrollarea where the layout is located. But is this really my best option? What to keep in mind when having many widgets? Or is removing the widgets that are currently not supposed to be shown from the layout enough? Have good 1st may.
-
@StudentScripter Things to keep in mind is that if you have a QScrollArea that contains the equivalent of multiple screens worth of widgets, then it won't be nice for your users.
You should start by drawing your widgets and then think about how many are necessary, how they should be shown, etc. And if possible discuss that with people from your target audience.
-
@SGaist Thank you very much. One last questions before closing this thread:
- Does using setListWigetItem (QListWidget) make an difference in performance compared to just using the widgets inside a scrollarea or is the overhead the same?
Have a nice day! :)