Results 1 to 2 of 2

Thread: Dynamic creation of widget with N images

  1. #1
    Join Date
    Jun 2012
    Thanked 3 Times in 3 Posts
    Qt products

    Default Dynamic creation of widget with N images

    I have an application which displays N "sub-images" as a single composite image where N can be from one to six.

    The images are scaled preserving their original aspect ratio. The composite image is scaled to fit the full display height or full width. The scaling factor is determined by calculating whether the composite image will be width or height constrained.

    The composite image changes scale to fit additional images appended horizontally as they are acquired (maybe just one, up to 6 total). A new set of 1-6 individual sub-images is created every few minutes and the process is repeated. The previous composite image is "cleared", and a new composite image is created and modified as a new set of sub-images are acquired.

    Currently, the application uses both OpenCv and Qt. The scaling of the sub-images and creation of the composite image is done in OpenCv. Then the composite image is assigned to a single Qt label's pixmap for display.

    I'm doing a simplified version of the application and I'm considering using only Qt. I haven't seen an example that does what I need to do, but using only Qt I figure I'll calculate a scale factor just like I do when using OpenCv, use a QLabel for each image, and calculate a position for each sub-image (label).

    Is there a better or higher level approach that would be better?


    Dave THomas

  2. #2
    Join Date
    Jan 2006
    Graz, Austria
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Unix/X11 Windows

    Default Re: Dynamic creation of widget with N images

    If you need to be able to freely place the sub images, you might want to look at QGraphicsView and QGraphicsPixmapItem


Similar Threads

  1. Replies: 1
    Last Post: 10th February 2011, 21:32
  2. Replies: 3
    Last Post: 18th July 2010, 14:53
  3. Dynamic widget creation from an XML-like file
    By ttvo in forum Qt Programming
    Replies: 2
    Last Post: 1st June 2009, 23:15
  4. Dynamic widget plugin
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2009, 19:26
  5. Dynamic widget not displayed upon Qwidget
    By ashukla in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2007, 12:11


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.