Results 1 to 20 of 28

Thread: how to implement this MainWindow just like iTunes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    58
    Thanks
    2

    Default Re: how to implement this MainWindow just like iTunes

    still nobody how to do this?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to implement this MainWindow just like iTunes

    Have you seen QShortCut docs?

  3. #3
    Join Date
    May 2008
    Posts
    58
    Thanks
    2

    Default Re: how to implement this MainWindow just like iTunes

    hi wysota,
    I think you missed my question, when your application is not active status, how can you emulate the shortcuts keys.
    QShortCut sounds only work for activated widget.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to implement this MainWindow just like iTunes

    Isn't it how it works? That The "M" shortcut minimizes the current window?

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to implement this MainWindow just like iTunes

    Quote Originally Posted by wysota View Post
    Isn't it how it works? That The "M" shortcut minimizes the current window?
    Actually it minimizes all windows. But the problem is that Windows won't send necessary messages to a frameless window.
    J-P Nurmi

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to implement this MainWindow just like iTunes

    Well, that doesn't surprise me One can always hook to some other window using regular WinAPI means and intercept a message directed to another window. It's a dirty hack of course...

  7. #7
    Join Date
    Apr 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: how to implement this MainWindow just like iTunes

    I am trying something similar.

    While I managed to apply some styles to the Menubar and Toolbar, I am still facing a wall regarding margins/padding on the Central area of QMainWindow

    What happens is that whatever "something" I add as QMainWindow::setCentralWidget( something ), this main area *always* show a padding.

    I want to add a customer banner just below the Menubar (no Toolbar in my case). But this banner can never expand all the way to the top (right below the menu) and to the sides, there is always that 5-10pix padding.

    I've tried a lot of different things in stylesheets, even this doesn't fix it :
    Qt Code:
    1. *,
    2. spacing: 0;
    3. padding: 0;
    4. margin: 0;
    5. }
    To copy to clipboard, switch view to plain text mode 

    Any advice would be really really appreciated !

  8. #8
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to implement this MainWindow just like iTunes

    How about bool QCoreApplication::winEventFilter ( MSG * msg, long * result ) or virtual bool QWidget::winEvent ( MSG * message, long * result )?
    Sorry, i hadn't time to check it, but perhaps SC_MINIMIZE message is still sent by windows to frameless windows, but qt doesn't interpret it for frameless windows. I'm not sure about it but i think it's workth a try.

    As for context menu, you could try to emulate it with popup QMenu or if you want to call real one try sending WM_SYSCOMMAND message with wParam=SC_KEYMENU
    (http://msdn.microsoft.com/en-us/libr...60(VS.85).aspx)
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

Similar Threads

  1. Replies: 1
    Last Post: 11th September 2007, 13:34
  2. What's the best way to implement a MainWindow
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2007, 17:46

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
  •  
Qt is a trademark of The Qt Company.