Results 1 to 9 of 9

Thread: Palette toolbar

  1. #1
    Join Date
    Jun 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Palette toolbar

    I need a widget that implements the palette toolbar, like in CorelDRAW (or at least like in Windows' Paint). I mean that there should be a column of tiny squares, each represent a color and a button, when I press it, some more columns appear with the rest of colors. And also it must be possible to add custom colors. And current color should be highlighted somehow.
    I've looked through Qxt, Qwt, many websites, but didn't find anything appropriate I'm sure that such a widget must exist...somewhere...
    thanks in advance


    P.S. and a little question...I wonder why QGraphicsItem (and none of its children) doesn't have copy constructor and operator=
    Last edited by Radagast; 7th July 2008 at 14:10.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Palette toolbar

    I have plans to make such a widget and actually I have something very similar already implemented in my QwwColorButton widget that is part of wwWidgets. The model and the view are already there, only that the view is no available as a separate widget.

  3. #3
    Join Date
    Jun 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Palette toolbar

    I've seen your QwwColorButton well it seems like a single button that can change its color, and I need a huge set of buttons in a toolbar that doesn't change their colors. Well if nobody sends a ready implementation, I'll make my own...would you like to add it to your lib?
    Last edited by Radagast; 7th July 2008 at 14:36.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Palette toolbar

    Click on the button and you'll see your list.

  5. #5
    Join Date
    Jun 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Palette toolbar

    is it possible to add QToolButtons into single QToolBar in several rows(columns)?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Palette toolbar

    Not out of the box. But you can add widgets so in theory you can make a widget with a vertical or horizontal layout that contains several toolbars and put that widget into the top-level toolbar. It would probably look bad, though.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Palette toolbar

    Is this what you wanted?
    Attached Images Attached Images

  8. #8
    Join Date
    Jun 2008
    Posts
    57
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Palette toolbar

    wysota
    looks like that...can't say exactly till I see the source

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Palette toolbar

    This is taken directly from wwWidgets - a standard QListView with disabled scrollbars, fixed width and QFrame::NoFrame frame style with a ColorModel and ColorDelegate set. The view needs to have the vertical and not horizontal item placement direction and wrapping enabled.

    The first widget shows a single "column", the second one shows three "columns".

Similar Threads

  1. Palette Frame
    By csvivek in forum Qt Programming
    Replies: 2
    Last Post: 14th April 2008, 05:34
  2. Create a Toolbar on a Subclassed Textedit?
    By c_07 in forum Qt Programming
    Replies: 5
    Last Post: 12th October 2007, 18:17
  3. Adding a toolbar to a TableWidget
    By Walter in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2007, 21:13
  4. Initialise toolbar in a different area
    By georgie in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2006, 03:49
  5. animating a toolbar??!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2006, 08:27

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.