Results 1 to 5 of 5

Thread: how to apply stylesheet to QListWidgetItem using .qss file?

  1. #1
    Join Date
    Mar 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to apply stylesheet to QListWidgetItem using .qss file?

    Hi,

    I want to know how to apply stylesheet to QListWidgetItem using qss file.

    I want to set background image of 1st list item. Want to change the image when i'll select that list item. Is it possible? If yes pls tell me how to do this. Also pls tell me if i can set max number of items of a QListWidget.

    Thanks in advance,
    Namita

  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: how to apply stylesheet to QListWidgetItem using .qss file?

    To use stylesheets on items you need Qt 4.4. Otherwise your only choices are a custom delegate or changing the model data. I'd suggest going for the custom delegate approach, it's really easy to do what you want.

  3. #3
    Join Date
    Mar 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to apply stylesheet to QListWidgetItem using .qss file?

    Hi,

    Can you pls explain how to go about custom delegate approach?

    Thanks in advance,
    Namita

  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: how to apply stylesheet to QListWidgetItem using .qss file?

    Please search the forum on custom delegate.

  5. #5
    Join Date
    Mar 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to apply stylesheet to QListWidgetItem using .qss file?

    Hi,

    I want to know how can I apply stylesheet to atopia application using qss file.
    I want to run this application on green phone emulator. Where should I save .qss file.
    I tried to run one of my developed qt application on emulator, but the images are missing.

    Pls help me.

    Thanks in advance,
    Namita

Similar Threads

  1. Replies: 8
    Last Post: 17th March 2008, 14:04
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.