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

  • SEARCH
  • Home
  • 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 1035921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:37:08+00:00 2026-05-16T14:37:08+00:00

(see edits) I’m developing a QT/c++ application under gnome. The application a main window

  • 0

(see edits)

I’m developing a QT/c++ application under gnome.

The application a main window and QListBox child window.

Both of these windows show up as separate main windows when I alt-tab away from the application.

How can I make it so that only one window is shown when I (or later the user) uses alt-tab?

I am guessing this behavior comes because one main window doesn’t clip the subwindow – the subwindow extends the boundary of the main window. Gnome has bad alt-tab behavior for a number of other applications too, showing modal dialog boxes separately from main windows. But in the case of my app, this is really annoying.

I am thinking I could make a giant transparent window that includes both existing windows. But it would be nicer to find a “clean” solution.

(the most logical guess is indeed that it has something to do with window flags. I’ve tried every reasonable combination of flags I could think of. The window types are described here)

Edit:
The app has a QWidget as its main window (Not QMainWindow), QListView is contained in the QWidget object and created by passing a point to the main window.
is styled with Qt::Tool | Qt::FramelessWindowHint.

Edit2: The Qt::X11BypassWindowManagerHint style does work to remove the window from the alt-tab list. The problem is that it also makes the window “unmanaged” so it cover the other windows. I could manaully hide whenever I lose focus – prize now for a better solution.

  • 1 1 Answer
  • 2 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-16T14:37:09+00:00Added an answer on May 16, 2026 at 2:37 pm

    When creating a window for your QListBox window set a Qt::Tool window flag in its constructor or later with setWindowFlags function call. Here is some code snippet(I omitted the headers):

    int main(int argc, char** argv)
    {
        QApplication app(argc, argv);
        QMainWindow mw;
        mw.show();
        QWidget toolWindow(&mw, Qt::Window|Qt::Tool);
        QHBoxLayout layout(&toolWindow);
        toolWindow.setLayout(&layout);
        QListView lv(&toolWindow);
        layout.addWidget(&lv);
        toolWindow.show();
    
        return app.exec();
    }

    I’ve tested this on my Debian sid box (Gnome 2.30, metacity 2.30.1) with freshly created user: image proof on answer to question #3553428.

    If this is not what you wanted, then please name the software which works correctly or you may check it yourself. To do this run xprop in terminal window and click on the window you are interested in. The output will contain window flags. The one you are interested in is _NET_WM_WINDOW_TYPE(ATOM). For the tool window(i.e. not listed in alt-tab) this flag is:

    _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_NORMAL
    

    If the window with these flags is not a toolbox window then something is wrong with your window manager or you have personally set such behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See edits below There is no casting going on with the termination check. I
Hi fellow android developers! I am developing an application where I have XML files
NOTE: Solved my own problem, it seems. See the edits. I am trying to
I have written a web application that interacts with Google calendar (adds/edits/updates events). You
EDIT: See my answer below--> I am wanting to have a view that when
Intro: EDIT: See solution at the bottom of this question (c++) I have a
EDIT: See this in action here: http://jsbin.com/emobi/5 -- and that's using mouseenter/mouseleave. I have
PLEASE SEE THE EDIT BELOW, THE REPORT SEEMS TO USE CACHED DATA? I cant
This question was initially misphrased, see the EDIT below. I'll leave it up for
EDIT: I see why it doesn't run twice. I have the Ajax.BeginForm() call inside

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.