Using NSBox in QMacCocoaViewContainer



  • I'd like to use native Cocoa NSbox inside QMacCocoaViewContainer.
    Does anyone have an idea how to put a QWidget with its own layout inside a NSBox?
    It must be also transparent because NSBox default background is dark.


  • Lifetime Qt Champion

    Hi,

    Out of curiosity why do you need a NSBox in the first place ? Wouldn't a QGroupBox do the job ?



  • @SGaist Hi! Yes QGroupBox is fine, but NSbox adds more options:
    enum {
    NSBoxPrimary = 0,
    NSBoxSecondary = 1,
    NSBoxSeparator = 2,
    NSBoxOldStyle = 3,
    NSBoxCustom = 4
    };
    typedef NSUInteger NSBoxType;

    typedef enum _NSTitlePosition {
    NSNoTitle = 0,
    NSAboveTop = 1,
    NSAtTop = 2,
    NSBelowTop = 3,
    NSAboveBottom = 4,
    NSAtBottom = 5,
    NSBelowBottom = 6
    } NSTitlePosition;

    etc.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.