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. Cover QWidget Buttons, min Size , Calculator
Qt 6.11 is out! See what's new in the release blog

Cover QWidget Buttons, min Size , Calculator

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 326 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.
  • F Offline
    F Offline
    fatih1
    wrote on last edited by
    #1

    Screenshot 2020-05-25 at 16.39.15.png

    Hello,
    I have got a calculator QWidget and I would like to minimize its size at the beginning so that only the black marked frame is shown. Then, upon extension (the left upper green button)I would like to show the other buttons as well

    I can extend and set a min/max size of the buttons, but I want the buttons just to appear after clicking an extension button.
    The buttons and the display are in a QGridlayout

    This is the used code
    https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html
    How can I do it?
    Thanks

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

      Hi
      One way would be to add the section 2 of buttons to its own QWidget + layout and
      simply hide / show that Widget on demand.

      1 Reply Last reply
      1

      • Login

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