Results 1 to 3 of 3

Thread: QGLWidget

  1. #1
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QGLWidget

    hi,

    how to place a Push Button and an QLCDNumber on the QGLWidget... while the QGLWidget displays the graphics content

    Thank you.

  2. #2
    Join Date
    Apr 2007
    Location
    Rakovnik, Czech Republic
    Posts
    175
    Thanks
    43
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGLWidget

    you do it just like with any other widget. For example:

    Qt Code:
    1. QPushButton *myB = new QPushButton(myQGLWidget);
    2. myB->move(10,10);
    3.  
    4. // or
    5. // QPushButton *myB = new QPushButton;
    6. // myB->setParent(myQGLWidget);
    To copy to clipboard, switch view to plain text mode 

    puts a QPushButton on the previously instantiated/defined QGLWidget. The default location of the PushButton is 0,0 (from the upper left); "10,10" moves it down 10, and to the right 10.

  3. #3
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QGLWidget

    Thank you for the reply..

Similar Threads

  1. Replies: 1
    Last Post: 23rd April 2009, 10:05
  2. Replies: 1
    Last Post: 21st November 2008, 08:00
  3. Replies: 4
    Last Post: 7th May 2008, 01:01
  4. QGLWidget resize problem.
    By anderl in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2008, 09:57
  5. QGLWidget on another QGLWiget
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2006, 10:59

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.