Results 1 to 2 of 2

Thread: name of current QStyle

  1. #1
    Join Date
    Jan 2007
    Posts
    68
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Default name of current QStyle

    hi there,

    i need to get my hands on the name of the current QStyle name.

    follwoing code:
    Qt Code:
    1. QStyle *currentStyle = QApplication::style();
    2. qDebug() << "currentStyle " << currentStyle;
    3. qDebug() << "currentStyle " << currentStyle->metaObject()->className();
    To copy to clipboard, switch view to plain text mode 
    shows

    currentStyle QWindowsXPStyle(ptrAddress, name = "windowsxp")
    currentStyle QWindowsXPStyle

    on the console

    "windowsxp" is the property I'd like to get

    anyone knows how to do this?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: name of current QStyle

    What about currentStyle->objectName()?

    EDIT: yes, it works. just tested it...

    Regards

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

    darksaga (31st August 2007)

Similar Threads

  1. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  2. Replies: 15
    Last Post: 21st April 2007, 17:46
  3. Replies: 1
    Last Post: 19th April 2007, 22:23
  4. Fonts, Colors, and QStyle
    By Jimmy2775 in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2006, 07:26
  5. How to get current row(column) index in the QTextTable?
    By denny.t in forum Qt Programming
    Replies: 3
    Last Post: 5th April 2006, 07:53

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
  •  
Qt is a trademark of The Qt Company.