Results 1 to 2 of 2

Thread: Make lines on scene always the same size?

  1. #1
    Join Date
    Mar 2014
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question Make lines on scene always the same size?

    I have made a image viewer that can make lines over the images but if the image have high resolution the lines become small (like in the images uploaded, the cat image as big lines and the macaw image has tiny lines). Is there a way to make the lines with a fixed size regardless of the scene size?

    My scene is set like:
    Qt Code:
    1. item[0]->setPixmap(image.at(img)->getPixmap(0));
    2. scene[0]->setSceneRect(0, 0, item[0]->pixmap().width(), item[0]->pixmap().height());
    3. ui->graphicsView0->fitInView(item[0], Qt::KeepAspectRatio);
    To copy to clipboard, switch view to plain text mode 

    Attachment 10717
    Attachment 10718

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Make lines on scene always the same size?

    You can try makingthe line items ignore transformations or you only transform the image item.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    darktorres (1st November 2014)

Similar Threads

  1. Replies: 0
    Last Post: 14th February 2012, 16:43
  2. Replies: 0
    Last Post: 3rd November 2011, 19:03
  3. Make the Treeview lines disapear
    By Vertilka in forum Qt Programming
    Replies: 0
    Last Post: 19th October 2009, 13:43
  4. how to make lines or points flicker?
    By lengshuang in forum Qt Programming
    Replies: 2
    Last Post: 21st April 2009, 12:53
  5. Replies: 2
    Last Post: 23rd March 2009, 18:26

Bookmarks

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.