Results 1 to 17 of 17

Thread: Paint Windows Frames

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Paint Windows Frames

    aamer4yu, I tried to use qskinobject, but when I enable skins in example, widgets start blinking.

    I almost finished emulation of moving and resizig, but when Qt::SplashScreen flag, there is no application on a task bar. How to remove system windows decorations, and save precense on a task bar?
    Last edited by Iskander; 3rd September 2009 at 14:23.

  2. #2
    Join Date
    Apr 2008
    Posts
    196
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 8 Times in 6 Posts
    Wiki edits
    1

    Default Re: Paint Windows Frames

    You can inherit from QDialog and overload the paint method.

    Best Regards
    NoRulez

  3. #3
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Paint Windows Frames

    Quote Originally Posted by NoRulez View Post
    You can inherit from QDialog and overload the paint method.

    Best Regards
    NoRulez
    Of course I inherits from QWidget and all my windows inherts from my "skinned widget". But in paint method it is impossible to draw system windows borders.

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

    Default Re: Paint Windows Frames

    Quote Originally Posted by Iskander View Post
    But in paint method it is impossible to draw system windows borders.
    Didn't I tell you that like... 7 posts ago? They are called "system borders" for a reason. All you can do is disable them by passing Qt::FramelessWindowHint hint to your widget.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Paint Windows Frames

    Quote Originally Posted by wysota View Post
    Didn't I tell you that like... 7 posts ago?
    yes, my previos post was answer for NoRulez.
    Quote Originally Posted by wysota View Post
    They are called "system borders" for a reason.
    ok
    Quote Originally Posted by wysota View Post
    All you can do is disable them by passing Qt::FramelessWindowHint hint to your widget.
    Yes, I've done it in 0 post. How to stay on a task bar, while setting the flag?

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

    Default Re: Paint Windows Frames

    Quote Originally Posted by Iskander View Post
    How to stay on a task bar, while setting the flag?
    You can't. At least not without diving into native API although I think in this particular case it wouldn't help.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default

    Quote Originally Posted by wysota View Post
    You can't. At least not without diving into native API although I think in this particular case it wouldn't help.
    So should I do something like this?
    Qt Code:
    1. #if defined(Q_WS_WIN)
    2. ....
    3. #endif
    4.  
    5. #if defined(Q_WS_X11)
    6. ....
    7. #endif
    To copy to clipboard, switch view to plain text mode 
    sadly.

    And, as I understand, under linux behaviour depends from current DE settings...

    May be it is possible to use QDesktopServices, do you know?

    Well, I think about creating a widget out of display region, and in focusInEvent make my "skinned" widget focused, but I think, it's too dirty hack...
    Last edited by wysota; 4th September 2009 at 09:34.

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

    Default Re: Paint Windows Frames

    What would desktop services have to do with that? What is exactly that you want to obtain?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Paint Windows Frames

    Sorry for my english.

    I want to use my own systems borders(1). So I set Qt::FramelessWindowHint flag.
    But there is no my apllication on the task panel in that way.(2)
    I want something like winamp - but skin systems does not requiered.


    I read QDesktopServices docs, and not found anything, relative to my problem, it serves for desctop enviroment, not for task bar, so sorry for my question

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

    Default Re: Paint Windows Frames

    Try searching for a solution in WinAPI docs but I doubt you will be able to get the taskbar entry back after disabling system borders. You can try something else though... Don't disable the borders but instead mask them out using QWidget::setMask(). You should not lose the taskbar entry then but the borders wouldn't be visible and you could provide your own ones inside the client area.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Aug 2009
    Location
    Almaty, Kazakhstan
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Paint Windows Frames

    wysota, thank you! setMask(rect()) works fine!

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

    Default Re: Paint Windows Frames

    Quote Originally Posted by Iskander View Post
    wysota, thank you! setMask(rect()) works fine!
    Just note that things such as maximizing the window will probably work incorrectly.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Qt Jambi, deploying app on Mac & Windows fails
    By ChrisColon in forum Installation and Deployment
    Replies: 2
    Last Post: 16th February 2009, 22:05
  2. Replies: 5
    Last Post: 15th January 2009, 09:03
  3. Opening text file fails after autostartup on windows
    By yogourta in forum Qt Programming
    Replies: 2
    Last Post: 18th October 2008, 03:52
  4. Windows not appearing in XP.
    By beardybloke in forum Qt Programming
    Replies: 7
    Last Post: 24th October 2007, 17:32
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

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.