Important: Please read the Qt Code of Conduct -

QGraphicsScene retina support for QWidgets

  • The retina support does not work when qt widget is added to QGraphicsScene?

    Below is the code i am working on.

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    MainWindow w;

    QGraphicsView view;
    QGraphicsScene *scene = new QGraphicsScene(0, 0, 500, 500, &view);
    QWidget *widget = new QWidget();
    QVBoxLayout *lay = new QVBoxLayout();
    QSlider *slider = new QSlider(Qt::Horizontal);
    return a.exec();


    After changing slider's position the icon is disappeared. Someone know if it possible to fix it and how?

    [fixed typo in title, Eddy]

  • Hi,

    Welcome to the forum.

    Your code works for me. There must be something else going on.
    Can you show us the code of your MainWindow class?

    Also, what OS you're on, which Qt version?

  • I used Qt5.2.0
    I test it on my Max OS X 10.8 and 10.9.1. and its does not work.
    In my MainWindow nothing extra.

    Are you sure that you tested it on retina display?
    Thanks for such soon respond

    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    ui(new Ui::MainWindow)

    delete ui;

  • I misunderstood the environment you are working in. I thought you didn't see the slider movable part. I tested on windows 7. There it works fine.

    Maybe someone else on os x can test it for you.

    Can you elaborate on the "icon dissappearing" part? Maybe a screenshot?

  • I use Mac OS X 10.8.4 and Mac OS X 10.9.1.
    In normal display it works fine but in retina display the movable part of slider disappears. Sometimes even the whole slider is not visible.

    I put the links of screen shot bellow:


  • You can check also on "JIRA": for a reported bug with Retina . In case you cannot find anything reported there, please file a bug report.

    If you put a link to this thread there, all info here can be easily found. Please add the bug report number here as a tag for easy finding it back.

Log in to reply