Results 1 to 5 of 5

Thread: appBar: allocated space problem

  1. #1
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default appBar: allocated space problem

    Hi, I created a program (for windows) that docks a bar just over the windows bar (task bar). The problem is when I allocate the space to put the bar, it appears in the space that was reserved and then moves (by itself) to the middle of the screen.

    The weird thing is if i put a QMessageBox in the code before the "move" statement, it works, I mean the bar stays in the place that was reserved.

    Obviously i need the bar stays in the allocated space without any QMessageBox.

    I attach here an example code.

    PS: Mostly of this problem belong to windows API, may be this is not the correct forum, in that case, please tell me where can I post this topic.
    Attached Files Attached Files

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

    Default Re: appBar: allocated space problem

    Hi,
    this problem occurs quite often,
    try move your bar in showEvent - even if it won't help the movement woll be less visible.
    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).

  3. #3
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: appBar: allocated space problem

    To resolve this problem, the following line is needed in widget constructor:
    SetWindowLong(winId(), GWL_EXSTYLE, WS_EX_TOOLWINDOW);

    Thanks.

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

    Default Re: appBar: allocated space problem

    Quote Originally Posted by mito View Post
    To resolve this problem, the following line is needed in widget constructor:
    SetWindowLong(winId(), GWL_EXSTYLE, WS_EX_TOOLWINDOW);
    I guess passing Qt::Tool to QWidget constructor would do the same...
    J-P Nurmi

  5. #5
    Join Date
    Apr 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: appBar: allocated space problem

    Quote Originally Posted by jpn View Post
    I guess passing Qt::Tool to QWidget constructor would do the same...
    Thanks, i tested this on MS Windows but didn't work.
    This problem only happen on MS Windows, in Linux works great (with X11 API)

Similar Threads

  1. Space problem in QTextEdit
    By ashukla in forum Qt Programming
    Replies: 4
    Last Post: 23rd January 2008, 09:28
  2. appbar: allocate screen space (dock and lock)
    By mito in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2007, 18:39
  3. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.