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. How draw customize toolbar button in QT
Forum Updated to NodeBB v4.3 + New Features

How draw customize toolbar button in QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 552 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.
  • A Offline
    A Offline
    Aleskey
    wrote on 20 Feb 2019, 17:10 last edited by
    #1

    Hello. Can you please tell me how to create a button marked with attached pictures in this button. This button is needed to quickly customize the control panel.
    Thank.

    1_1550682395272_2.png 0_1550682395271_1.png

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 20 Feb 2019, 17:31 last edited by
      #2

      Hi and welcome to the forums
      The normal QToolButton can do it.
      You need
      a icon and use
      https://doc.qt.io/qt-5/qtoolbutton.html#setMenu
      to give it the popup menu
      and for building the menu you want to set
      setCheckable(true) for the QAction you give to menu if you need the checkmark feature.

      1 Reply Last reply
      1

      2/2

      20 Feb 2019, 17:31

      • Login

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