Results 1 to 11 of 11

Thread: problem in qss file

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post problem in qss file

    Hi All
    I need u peoples help.
    I want Qlable area part of my windows to be supressed, for which i've to add QFrame::WinPanel | QFrame::Sunken. I want to add it in default.qss.
    But its not working.
    Can any body help me?
    Thanx.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  2. #2
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in qss file

    Hi,

    Default painter/brush for the widget can be retrieved using
    Qt Code:
    1. QPalette().color(QPalette::Window);
    To copy to clipboard, switch view to plain text mode 
    But do you really have the same problem as I had?
    I had problem with setting default window color(the same as system colors).

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  3. The following user says thank you to maverick_pol for this useful post:

    phillip_Qt (9th April 2008)

  4. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in qss file

    Quote Originally Posted by maverick_pol View Post
    Hi,

    Default painter/brush for the widget can be retrieved using
    Qt Code:
    1. QPalette().color(QPalette::Window);
    To copy to clipboard, switch view to plain text mode 
    But do you really have the same problem as I had?
    I had problem with setting default window color(the same as system colors).

    Kacper
    My problem is that i'm applying color through qss files. when i select default.qss o/p window is coming but it ig little bit different than the default window. colour is same only QLable part shd b supresswed but its not supressed. I checked in designer. when i'm changing stylesheet the frameshape and frameshawod is changing.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  5. #4
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in qss file

    Maybe try setting QLabel style too, depending on needed features.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  6. #5
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in qss file

    Quote Originally Posted by maverick_pol View Post
    Maybe try setting QLabel style too, depending on needed features.

    Kacper
    But how to add in QLabel for FrameShape|QFrame::WinPanel and frameShadow|QFrame::sunKen.

    Can u plz tell me. I cannt find.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  7. #6
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in qss file

    I would devide changing appearance to 2 methods:
    1) setting qss files
    2) setting widget attributes(QFrame::Sunken),etc.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  8. #7
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in qss file

    Quote Originally Posted by maverick_pol View Post
    I would devide changing appearance to 2 methods:
    1) setting qss files
    2) setting widget attributes(QFrame::Sunken),etc.

    Kacper
    Thanx maverick.
    But how to change QFrame::Sunken throug qss file.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  9. #8
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in qss file

    Hi,

    But why you have to change the attributes in the qss?
    Why not to set appropriate qss file( no matter which) and then set the label attributes in your code?

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  10. #9
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in qss file

    Quote Originally Posted by maverick_pol View Post
    Hi,

    But why you have to change the attributes in the qss?
    Why not to set appropriate qss file( no matter which) and then set the label attributes in your code?

    Kacper
    Thanx i solved that. But its not affecting to the other exe i've linked. Means I ve some 10 buttons 1-0 in my o/p window. if ill press 0 it ll connect to another exe and another window ll show. But its color is not getting changed.

    What to do for it? Do u ve any idea?
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  11. #10
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in qss file

    I am not sure, but I suppose that every "exe" need qss file to be set. If you set a default.qss for the main app and you invoke a child app, the child also need to be assigned default.qss before being executed.

    But I am not sure. Just trying to help : )

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  12. #11
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in qss file

    Quote Originally Posted by maverick_pol View Post
    I am not sure, but I suppose that every "exe" need qss file to be set. If you set a default.qss for the main app and you invoke a child app, the child also need to be assigned default.qss before being executed.

    But I am not sure. Just trying to help : )

    Kacper
    Thanx maverick.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

Similar Threads

  1. Problem to find file path
    By phillip_Qt in forum Qt Programming
    Replies: 14
    Last Post: 28th April 2008, 11:06
  2. EXE File problem
    By triperzz in forum Installation and Deployment
    Replies: 8
    Last Post: 18th January 2008, 20:00
  3. Debug problem in Eclipse with qrc file
    By Vortex in forum General Programming
    Replies: 6
    Last Post: 27th December 2007, 01:56
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 09:08

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.