Results 1 to 6 of 6

Thread: Preserving border / antialiasing QWidget on a QGraphicsProxyWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Preserving border / antialiasing QWidget on a QGraphicsProxyWidget

    Hi,
    I have a QWidget, filled with some QPushButtons and QComboBoxes, which lives in a QGraphicScene, as courtesy of a QGraphicsProxyWidget.
    When i scale the QGraphicsView to a smaller size there are a few ugly things.

    I expected these (good old Nyquist), but I also expected to get rid of them (more or less) with a good antialiasing:
    Qt Code:
    1. view = new QGraphicsView(scene);
    2. view->setRenderHints(QPainter::HighQualityAntialiasing|QPainter::TextAntialiasing);
    3. view->scale(0.9,0.9);
    To copy to clipboard, switch view to plain text mode 
    Additionally I could improve my PixmapItems this way:
    Qt Code:
    1. this->fotoPixmapItem->setTransformationMode(Qt::SmoothTransformation);
    To copy to clipboard, switch view to plain text mode 
    Now the Pictures look ok, I can live with some rather ugly text antialiasing, but...

    ...I still have a problem with my widgets:
    Here you see a screenshot snippet of a QCombobox which lost its left black border line:
    Qcombobox.jpg
    FYC I have attached an enlarged (4 times, Photoshop) version of the same screenshot in the attachments.

    Is there any way to ensure that the border line is at least one pixel wide? Or to set up a better antialiasing for the widgets? I want the view to be user scaleable to better fit onto various screen sizes. Is scaling perhaps a stupid Idea in the first place?
    Attached Images Attached Images

Similar Threads

  1. Replies: 1
    Last Post: 26th April 2012, 18:15
  2. Border-image not working in QWidget?
    By astampor in forum Qt Programming
    Replies: 4
    Last Post: 3rd October 2011, 15:16
  3. Customised QWidget border
    By chandan in forum Newbie
    Replies: 1
    Last Post: 2nd March 2011, 17:08
  4. QWidget's border style
    By luochen601 in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2010, 07:17
  5. Showing QWidget border around the window
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 20th March 2008, 20:14

Tags for this Thread

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.