Did you need to do a QGraphics approach or was this just an experiment after I mentioned I was doing it? Technically it will work as QWidget, but can end up being more performant as QGraphics if you use a ton of images.
Porting the flow layout is basically just converting it to be a subclass of QGraphicsLayout which has some slightly different concepts when it comes to the geometry. But it is the same in terms of what it functions as. Layouts don't inherently have any visual representation. They just manage the size and position of the items assigned to it. So it wouldn't be considered a view. Just like in QWidgets, you still have to add the layout to the parent widget for which it will conform all the child widgets. In a QGraphics setup, you have a QGraphicsView which looks into a QGraphicsScene (the model) to view all of the items. Layouts aren't actually part of the core concepts. They are something you can use if you are using QGraphicsWidgets, which support a mixture of graphics items a qwidget concepts. On Mar 25, 2014 3:51 AM, "David Martinez" <[email protected]> wrote: > I think that I'm getting rather confused when it comes to port the class. > > > > As far as I know, when we deal with graphic elements we need both a > 'Scene' (data) and a 'View' (what displays data). When we inherit from > QGraphicsLayout, what we are creating is a 'Layout', right? Does that mean > that the resulting class is going to be our view class? Could you explain > how the different elements relate to each other? This is the first time > that I deal with graphic elements. All what I've done so far were regular > widgets. > > > > Many thanks > > > -- > David Martinez - Technical Animator > > Email: [email protected] > Website: http://www.elusiveideas.com > > > > > On Thu, Mar 20, 2014 at 12:52 AM, Justin Israel <[email protected]>wrote: > >> @David, my implementation was a direct port of the example flowlayout.py >> from a QLayout -> QGraphicsLayout so that I could use it in a >> QGraphicsScene. I do all of my image result listing there instead of a >> QWidget system >> >> >> On Thu, Mar 20, 2014 at 12:16 PM, David Martinez < >> [email protected]> wrote: >> >>> Thanks for the heads up Fredik >>> I will take a look :-) >>> >>> >>> -- >>> David Martinez - Technical Animator >>> >>> Email: [email protected] >>> Website: http://www.elusiveideas.com >>> >>> >>> >>> >>> On Wed, Mar 19, 2014 at 10:31 PM, Fredrik Averpil < >>> [email protected]> wrote: >>> >>>> +1 for flowlayout >>>> >>>> I have a side project which hasn't gotten a lot of attention lately but >>>> you can see how I implemented it here: >>>> https://github.com/fredrikaverpil/pyVFX-viewer >>>> >>>> // Fredrik >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Python Programming for Autodesk Maya" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWM3bV7irujE9P4jcWnJ31bCfg%2BaJuuainNz%2BQjVW3qKWA%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWM3bV7irujE9P4jcWnJ31bCfg%2BaJuuainNz%2BQjVW3qKWA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpzcVbrWco%2B5-%2BsHXijmCX8RmWAyTiB-6z-_519pGh8_mQ%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpzcVbrWco%2B5-%2BsHXijmCX8RmWAyTiB-6z-_519pGh8_mQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2J9AkmOAKjvJKvyiHzZEaAiUAeLpf%2BhSF55Fdz5CqAZg%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2J9AkmOAKjvJKvyiHzZEaAiUAeLpf%2BhSF55Fdz5CqAZg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpzMRae5Kw4wiO7wPydmSgcLGyhSOLas4i2rosUJR%2B6PBA%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpzMRae5Kw4wiO7wPydmSgcLGyhSOLas4i2rosUJR%2B6PBA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nQSYRqNuFj%2B0Q34uccxmH4gaKn5nXBsUt98vTRPc6Og%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
