Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Trouble with QGLWidget on iPhone 5 and iPad Air 2
Forum Updated to NodeBB v4.3 + New Features

Trouble with QGLWidget on iPhone 5 and iPad Air 2

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 469 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    I have upgraded to Qt 5.4 and am having some issues getting the openGL working properly. I have a QMainWindow with a QGLWidget attached. I am using this code to attach the openGL to the QMainWindow:

    @ QGLFormat format;
    format.setVersion(3,3);
    format.setProfile( QGLFormat::CoreProfile );
    format.setDepth(true);
    m_context = new QGLContext(format);

    m_model = new ModelView(*m_context, this);
    m_model->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    ui->OGLLayer->addWidget(m_model);
    m_model->showMaximized();@

    This code works on on my desktop (Mac) fine. But neither the iPhone or iPad work. With this code, the app never runs. It gets several -111 error and the app just aborts. If I modify this code like this, it will work on my iPad completely. The iPhone appears to work, but the openGL doesn't initialize properly. And it won't work at all on the Mac.

    @ QGLFormat format;
    format.setVersion(3,3);
    format.setProfile( QGLFormat::CoreProfile );
    format.setDepth(true);
    m_context = new QGLContext(format);

    m_model = new ModelView(*m_context, NULL);
    m_model->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    ui->OGLLayer->addWidget(m_model);
    m_model->showMaximized();@

    Any suggestions?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved