Results 1 to 20 of 28

Thread: Is there a QT widget similar to the Task Panel's used in many XP applications.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    20
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Here are the files.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2006
    Posts
    20
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    It looks like the port is not working properly. If you look at the attached pictures, you will see the difference. The main issue is the background color. Notice that the QT3 version paints the entire ListView object purple. The QT4 version does not paint the entire background. I've tried many things, and it looks like it is painted when a QPuListViewItem or QpuWidgetItem is added to the QPUListView object. The QT3 version will paint the Listview objects when there are no items.

    Does anyone have a suggestion on how to fix this?

    Thanks,
    Glenn
    Attached Images Attached Images

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

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Did you try setting the QPalette::Base brush?

  4. #4
    Join Date
    May 2006
    Posts
    20
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    I added this line to the function that creates the QPUListView object.

    taskView -> Q3ListView::setBackgroundRole(QPalette::Base) ;

    This will make the background white. If I set it to Dark or Window, it is still white when there are no QPUListViewItem or QPUListViewWidgets inserted into the QPUListView object. If I insert a QPUListViewItem it will make the background under the QPUListViewItem object dark or light grey. The rest of it is still white. I'm trying to make the entire back ground the color of the Window.

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

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    I don't know if I understand the problem, but the solution I mentioned seems to work fine for me...

    QPalette::Base of the list view is set to light yellow and QPalette::Window of the parent widget is set to light green (just to distinguish the background).
    Attached Images Attached Images

  6. #6
    Join Date
    May 2006
    Posts
    20
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    What did you compile this on? I'm using Linux and GCC. Could you the code of you example? Thanks.

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

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Linux + GCC There is no code, I mocked it in Designer. This is a QListView (or QListWidget, I don't remember) that has QPalette::Base colour component changed to light yellow inside a QWidget that has its QPalette::Window colour component changed to light green.

    An equivalent code is more/less:
    Qt Code:
    1. QWidget *wgt = new QWidget(...);
    2. QHBoxLayout *l = new QHBoxLayout(wgt);
    3. QListView *lv = new QListView;
    4. l->addWidget(lv);
    5. QPalette p = lv->palette();
    6. p.setColor(QPalette::Base, QColor(255,255,100));
    7. lv->setPalette(p);
    8. p = wgt->palette();
    9. p.setColor(QPalette::Window, QColor(100,255,100));
    10. wgt->setPalette(p);
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Just a quick screenshot of what I implemented today
    Attached Images Attached Images

  9. #9
    Join Date
    May 2006
    Posts
    20
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Talking Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Wysota,

    That works great. I added it to the QPUListView constructor. Thanks.

    The example you show in the last post, was the made with QT 4's QListView?

    Glenn

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

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    Quote Originally Posted by gsQT4 View Post
    The example you show in the last post, was the made with QT 4's QListView?
    No, this is a completely custom widget derived from QScrollArea. You can add separate "tasks" to it and assign any widget you want as the "body" of the task. You can even fill the widget with tasks in Designer. Of course the whole thing is stylable, so you can make it look just like the WinXP original.
    Last edited by wysota; 20th March 2007 at 09:49. Reason: Added some content

  11. #11
    Join Date
    Jun 2006
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Is there a QT widget similar to the Task Panel's used in many XP applications.

    gsQT4,

    do you have some working version of QpuListView in only Qt4 ?
    Or if you have with this some issues, maybe i can help you.

Similar Threads

  1. Replies: 2
    Last Post: 19th April 2006, 19: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.