Results 1 to 19 of 19

Thread: How any widget/frame/button to be displayed/look like outside boundary of main window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How any widget/frame/button to be displayed/look like outside boundary of main window

    Hi

    Please see the attached screenshots of software clean my Mac(Dummy-min.jpg)
    I have to create same screen for my application.
    This window contains two specific widget - one vertical frame containing a lot of options - showing outside the boundary of main window.
    second Scan button is showing outside the boundary of main window.

    Please help me or guide me that how we can create like this type of windows.
    I am using Qt 5.14 for MacOS.

    Please reply.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How any widget/frame/button to be displayed/look like outside boundary of main wi

    I think you could create these as top-level, frameless widgets (or non-modal dialogs) and use the Qt::FramelessWindowHint and Qt::WindowStaysOnTopHint window flags. (i.e. created with no parent) The widget containing the button might need a transparent background. If these windows have to stay in the same position relative to the main window, then you'll have to implement QEvent-handling code in the main window code for move, resize, hide, show, close, and maybe some other events to move / hide / close these other windows along with the main window.

    Since they have no parent, you will have to explicitly call deleteLater() when the main window is destroyed, I think. This should probably be done in a main window slot connected to the QObject::destroyed() signal for the main window. If you do it in the main window destructor instead, I think that will be too late and could cause a crash.
    Last edited by d_stranz; 8th November 2022 at 18:06.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. How to remove frame of main window widget
    By akhilteja in forum Newbie
    Replies: 1
    Last Post: 26th August 2013, 08:51
  2. Replies: 6
    Last Post: 12th August 2013, 19:13
  3. Replies: 3
    Last Post: 23rd December 2010, 07:55
  4. Add a Frame Widget to the main window
    By kamlmish in forum Qt Programming
    Replies: 2
    Last Post: 30th November 2010, 09:51
  5. Main Window frame height
    By ^NyAw^ in forum Qt Programming
    Replies: 18
    Last Post: 13th November 2007, 13:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.