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 to best implement my "about" button
QtWS25 Last Chance

How to best implement my "about" button

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 269 Views
  • 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.
  • P Offline
    P Offline
    Poggu
    wrote on last edited by
    #1

    Hello everyone,
    I am having sort of an issue with my Qt Application, in that I can't quite do what I want, and I don't know if I am even using the right Qt Widget to do so.
    I have this written this program to help fellow students work on japanese numbers. I want to add a menu bar on top of the window with a single "About" button that, when clicked, opens another window with "about"-style infos.
    My problem is that currently, I have implemented a QMenu that contains a single QAction in it, which technically does the job; however the task is done in two clicks and the drop-down list is redudant.
    alt text

    Instead, I want my "About" button to immediately open the "About" window, instead of having to select the only available option in the drop-down list, while keeping the style that a QMenuBar gives (that is, the stripe of a different shade of grey that the "About" button is embedded into).
    How should I go about making this?

    J 1 Reply Last reply
    0
    • P Poggu

      Hello everyone,
      I am having sort of an issue with my Qt Application, in that I can't quite do what I want, and I don't know if I am even using the right Qt Widget to do so.
      I have this written this program to help fellow students work on japanese numbers. I want to add a menu bar on top of the window with a single "About" button that, when clicked, opens another window with "about"-style infos.
      My problem is that currently, I have implemented a QMenu that contains a single QAction in it, which technically does the job; however the task is done in two clicks and the drop-down list is redudant.
      alt text

      Instead, I want my "About" button to immediately open the "About" window, instead of having to select the only available option in the drop-down list, while keeping the style that a QMenuBar gives (that is, the stripe of a different shade of grey that the "About" button is embedded into).
      How should I go about making this?

      J Offline
      J Offline
      JohnGa
      wrote on last edited by JohnGa
      #2

      @Poggu Please see this post it will help you: https://forum.qt.io/topic/68700/solved-add-qaction-into-qmenubar-in-designer

      You are currently adding a QMenu to the QMenuBar, and a QAction to the QMenu. Instead, using the above link just add the QAction directly to the QMenuBar.

      1 Reply Last reply
      4
      • P Offline
        P Offline
        Poggu
        wrote on last edited by
        #3

        It was that simple. Thank you very much!

        1 Reply Last reply
        0

        • Login

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