Results 1 to 5 of 5

Thread: QwtPlot line thickness

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default QwtPlot line thickness

    I've to print two curve one with a pen with size 1 and another with size 4.

    The preview it's good, but when printing the thickness of the two curve it's the same (very thin).

    I've read a previous thread about this, but sincerely I haven't understand the real problem and how to solve it.

    Please help
    Last edited by maluedo; 11th March 2010 at 11:05.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot line thickness

    QPen::setCosmetic(),

    Uwe

  3. #3
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Post Re: QwtPlot line thickness

    Hi Uwe, thanks for your reply,
    I'm trying to apply your suggestion.

    This is the code that I use in my QwtPlot class,
    when I print on my printer I get ever thin lines.

    Qt Code:
    1. QPen pen_2 = QPen(Qt::red, 4.0);
    2. pen_2.setCosmetic(false);
    3. d_crv2->setPen(pen_2);
    4. d_crv2->setYAxis(QwtPlot::yLeft);
    5.  
    6. d_crv2->attach(this);
    To copy to clipboard, switch view to plain text mode 

    Thanks
    maluedo

    P.S.
    the printpreview it's good, but when I print on the printer I get thin lines!
    Last edited by maluedo; 11th March 2010 at 15:57.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot line thickness

    I'm not sure what you mean by "preview", but I checked the bode example in combination with PDF, Postscript and SVG. In all cases the curve line was scaled according to the resolution of the paint device - looking like on screen.

    I also checked Qwt from trunk, that doesn't need to scale manually anymore ( because of using a double based render engine ). The output of the bode example of this version looks ok too.

    Try to print a PDF document first and check the lines in a PDF viewer. If they are ok print the PDF document to your printer. Are your lines better then ?

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    maluedo (12th March 2010)

  6. #5
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QwtPlot line thickness

    Dear Uwe,
    I miss to said that I was building with qwt 5.2, I got the trunk revision and all it's working
    fine.

    Thanks for your patience
    maluedo

Similar Threads

  1. How to read and write line by line?
    By Alex Snet in forum Qt Programming
    Replies: 3
    Last Post: 28th November 2010, 15:49
  2. read QTextBrowser line by line
    By navid in forum Newbie
    Replies: 1
    Last Post: 1st March 2010, 15:05
  3. Replies: 1
    Last Post: 21st November 2009, 08:29
  4. Replies: 6
    Last Post: 14th May 2009, 12:02
  5. Almost reading QImage line by line, help me please.
    By newqtuser in forum Qt Programming
    Replies: 4
    Last Post: 18th July 2008, 14:22

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.