Results 1 to 2 of 2

Thread: About QGLWidget 's construct function

  1. #1
    Join Date
    Apr 2015
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default About QGLWidget 's construct function

    for the construct function
    Qt Code:
    1. QGLWidget(QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0)
    To copy to clipboard, switch view to plain text mode 
    when I use it likes this,(the class slicerCanvas and secCan all inherit QGLWidget)
    Qt Code:
    1. slicerX_ = new slicerCanvas(centerWidget_);//which load data and gen texture object
    2. slicerX_->setPlaneModel('y');
    3. secWid_ = new secCan(centerWidget_,slicerX_);
    To copy to clipboard, switch view to plain text mode 
    the secWid_ can display correct. But if the code like this
    Qt Code:
    1. secWid_ = new secCan(centerWidget_);
    2. slicerX_ = new slicerCanvas(centerWidget_,secWid_);//which load data and gen texture object
    3. slicerX_->setPlaneModel('y');
    To copy to clipboard, switch view to plain text mode 
    the secWid_ display correct(I use signal and slot to send and receive texture object,I don't konw whether this correct),I realy don't konw why.

  2. #2
    Join Date
    Apr 2015
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: About QGLWidget 's construct function

    I have solved this issue,I use QOpenGLWidget instead of QGLWidget

Similar Threads

  1. Using Qpainter in qglwidget paintGL function
    By danics in forum Qt Programming
    Replies: 0
    Last Post: 6th September 2014, 10:20
  2. How to construct a QTransform?
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 24th June 2011, 15:20
  3. Must construct QApplication before QPaintDevice
    By sekatsim in forum Qt Programming
    Replies: 16
    Last Post: 8th June 2008, 00:00
  4. How to construct a ip contraler?
    By longtrue in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2008, 06:48
  5. How to construct Image from Bytes
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 29th January 2007, 05:41

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.