Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6955601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:45:29+00:00 2026-05-27T14:45:29+00:00

Why wont this work? Its supposed to work like this: when File is clicked,

  • 0

Why wont this work? Its supposed to work like this: when “File” is clicked, a toolbar (not a menubar) shows right beneath the menubar with different buttons on it that would be found in a “File” menu, and when “Edit” is clicked the “File” toolbar is hidden and the “Edit” toolbar is shown.

menubar = new MyMenuBar(this);//this is a menubar with "file" and "edit"
menubar->setGeometry(0,0,1100,30);

ftoolbar = new MyFileToolBar(this); // this is a toolbar with buttons that would be
// found in a "file" menu
ftoolbar->setGeometry(0,30,1100,40);
ftoolbar->hide();

etoolbar = new MyEditToolBar(this); // this is a toolbar with buttons that would be
//found in an "edit" menu
etoolbar->setGeometry(0,30,1100,40);
etoolbar->hide();

//here down does not work
connect(menubar->File, SIGNAL(aboutToShow()), ftoolbar, SLOT(show()));
connect(menubar->File, SIGNAL(aboutToHide()), ftoolbar, SLOT(hide()));


connect(menubar->Edit, SIGNAL(aboutToShow()), etoolbar, SLOT(show()));
connect(menubar->Edit, SIGNAL(aboutToHide()), etoolbar, SLOT(hide()));

File
File
EditEdit

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:45:30+00:00Added an answer on May 27, 2026 at 2:45 pm

    I made a bad assumption about what triggered(QAction*) meant.

    I replaced

    connect(menubar->File, SIGNAL(triggered(QAction*)), ftoolbar, SLOT(show()));
    connect(menubar->File, SIGNAL(triggered(QAction*)), ftoolbar, SLOT(hide()));
    
    
    connect(menubar->Edit, SIGNAL(triggered(QAction*)), etoolbar, SLOT(show()));
    connect(menubar->Edit, SIGNAL(triggered(QAction*)), etoolbar, SLOT(hide()));
    

    with

    connect(menubar->File, SIGNAL(aboutToShow()), ftoolbar, SLOT(show()));
    connect(menubar->File, SIGNAL(aboutToHide()), ftoolbar, SLOT(hide()));
    
    
    connect(menubar->Edit, SIGNAL(aboutToShow()), etoolbar, SLOT(show()));
    connect(menubar->Edit, SIGNAL(aboutToHide()), etoolbar, SLOT(hide()));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How are you supposed to dispose of a BitmapSource ? // this wont work
Yeah this works in FF and Chrome, but for some reason wont work in
I know downcasting like this won't work. I need a method that WILL work.
This just won't work. The problem is that I do not know enough to
Is there a way to accomplish something like this? I work in Python, but
why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject(Microsoft.XMLHTTP); }
Why won't this work? public static int[] GetListOfAllDaysForMonths() { static int[] MonthDays = new
I can't see why this won't work. I am performing lstrip() on the string
I know this won't work. I tried it in various forms and failed all
How can I add key value pairs to an array? This won't work: public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.