Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Open GL - Drawing A square by clicking a button
Forum Updated to NodeBB v4.3 + New Features

Open GL - Drawing A square by clicking a button

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 346 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.
  • J Offline
    J Offline
    Jisha
    wrote on last edited by
    #1

    Hi,
    I am a very beginner in openGL. What I need is to create a button and on clicking that I should be able to draw a square as we do in Microsoft Paint program.
    Thanks,
    Jisha

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome to the forums.
      You can start by getting to know
      https://doc.qt.io/qt-5/qtgui-openglwindow-example.html
      as that is the minimum setup you need with shaders etc to show something/anything.

      Then step 2 would to modify code to draw recatangle and then step 3
      is trying to do it with the mouse if that what you mean by "like in Ms Paint"

      You will need some understanding of openGL and basic elements like vertices etc

      1 Reply Last reply
      3

      • Login

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