Results 1 to 6 of 6

Thread: Draw listbox (or pushbutton or slider ...) by opengl in QT

  1. #1
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question Draw listbox (or pushbutton or slider ...) by opengl in QT

    Hello

    I use glwidget class to draw my mainwindow ui form. (mainwindow class is parent of glwidget class).
    Now i need to have a listbox in almost center of my form.
    I don't want to use QListBos gui component, because whole my form is drawn by glwidget class.
    Now i want to draw listbox in glwidget class, but it's hard for me to draw.
    Does any body now how i can find any class about drawing listbox (or pushbutton or slider ...) in opengl and glwidget class?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Draw listbox (or pushbutton or slider ...) by opengl in QT

    Drawing or actually making it work?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Draw listbox (or pushbutton or slider ...) by opengl in QT

    I want drawing

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Draw listbox (or pushbutton or slider ...) by opengl in QT

    QStylePainter (or QStyle itself) is capable of drawing Qt widgets on a given painter. You can either open a painter directly on OpenGL canvas in Qt4 or use QOpenGLPaintDevice in Qt5 or paint on a pixmap, then convert it to a texture and apply it wherever you want directly in GL scene.

    An alternative is to use Qt Quick.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Feb 2015
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question Re: Draw listbox (or pushbutton or slider ...) by opengl in QT

    Quote Originally Posted by wysota View Post
    QStylePainter (or QStyle itself) is capable of drawing Qt widgets on a given painter. You can either open a painter directly on OpenGL canvas in Qt4 or use QOpenGLPaintDevice in Qt5 or paint on a pixmap, then convert it to a texture and apply it wherever you want directly in GL scene.

    An alternative is to use Qt Quick.
    Would u do me a favore and give me a simple code to understand more?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Draw listbox (or pushbutton or slider ...) by opengl in QT

    Simple code that does what? Which part you do not understand?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. can you draw over a pushbutton?
    By illuzioner in forum Qt Programming
    Replies: 4
    Last Post: 30th August 2017, 08:14
  2. Draw with OPenGL inside QMAinWindow
    By zulunation in forum Newbie
    Replies: 10
    Last Post: 12th November 2014, 11:35
  3. Replies: 1
    Last Post: 19th May 2014, 07:04
  4. Draw curves using QPaint or opengl?
    By marc2050 in forum Newbie
    Replies: 1
    Last Post: 27th April 2011, 08:46
  5. Cylinder draw using QT opengl functions
    By YuriyRusinov in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2008, 23:58

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.