Skip to content
  • 0 Votes
    7 Posts
    149 Views
    JonBJ
    @kitebuggy I saw your code last night and that it was missing a layout on the central widget of the main window but wasn't sure whether that would produce the behaviour you see. So that you know: look at @Christian-Ehrlicher's two screenshots. The first one is your original code. Look at the Object Explorer pane at the right: notice that centralWidget has a "red no-entry sign" on it. Whenever you see that in Designer it indicates you are missing a layout on that widget. See how in the second screenshot that has disappeared. So look out for that when designing. (Having said this: I'm not quite sure what is going on with your QGroupBox widget: that still shows a "red no-entry" even though you have added an explicit QVBoxLayout on it. I tend not to add explicit layout objects unless I really need them, you can also set a layout on a widget by right-clicking on it and selecting Layout > (once it has at least one child widget, it's disabled before that) and I do that whenever possible. i am still not sure whether that way or adding an explicit layout as a child result in the same code/behaviour....)
  • 0 Votes
    4 Posts
    895 Views
    H
    I find this docs in Microsoft, but they use C#. I don't know If Qt can do the same as them? Microsoft Title bar [image: 44f63fcb-189e-4584-9636-fe82e76b82b1.png]
  • 1 Votes
    3 Posts
    2k Views
    B
    @schrute What I found to be effective, is to leave it as a bordered window, and just intercept the WM_NCCALCSIZE message, so that it does nothing. This basically gives you a bordered window, where you stop windows from drawing the borders. This way, when you implement your own title bar, aero snap will still work.
  • 0 Votes
    3 Posts
    1k Views
    T
    @mcf1lmnfs No, because title bar is not a Qt element, is system made, so I cannot change it via Qt Style Sheets.
  • 0 Votes
    2 Posts
    1k Views
    mrjjM
    Hi I have not seen steam on linux , however they might have use https://en.wikipedia.org/wiki/Client-side_decoration or something similar. or have hand made it. While this works ok for win https://github.com/dfct/TrueFramelessWindow I have not seen one for linux. Maybe due to all the different managers. Short story is. Qt do not draw the title bar so one can either totally fake it and draw all - and handle all min/max resize etc by manual code or if the Desktop/Manager supports it, use direct api extensions.
  • 0 Votes
    6 Posts
    3k Views
    J
    @SGaist I tried the Qt 5.12.6 and it did the trick! Thanks. But interestingly, the title of the main application is no longer scaled by "Make text bigger" setting but the dockwidget ones does. I guess that there is an intention not to scale the main title. "Make everything bigger" setting does scale everything properly now except the titlebar height of only the main application looks not enough for the enlarged font size. I will give qt5.14 a try as well.
  • Disable close button on qml window

    Unsolved QML and Qt Quick qml window title bar
    4
    1 Votes
    4 Posts
    6k Views
    AlperA
    @p3c0 said: Window { flags: Qt.FramelessWindowHint } Thanks it works.
  • How to: Unified OS X Title Bars?

    Unsolved General and Desktop os x title bar
    4
    0 Votes
    4 Posts
    4k Views
    XandlX
    Update: I managed to get a QWindow involved into the code, yet the toolbar is messed up. Screenshot New code: void Test::createFancyMacWindow() { QWindow* w = new QWindow(); NSView* mainWindowNSView = (NSView*) w->winId(); NSWindow* window = [mainWindowNSView window]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // move toolbar where the titlebar used to be [window setTitleVisibility: NSWindowTitleHidden]; // Adjust Cocoa layouts NSView *contentView = [window contentView]; [contentView setAutoresizesSubviews:YES]; QMacNativeWidget *nativeWidget = new QMacNativeWidget(contentView); //nativeWidget->move(0, 0); nativeWidget->setPalette(QPalette(Qt::red)); nativeWidget->setAutoFillBackground(true); NSView *nativeWidgetView = nativeWidget->nativeView(); [contentView addSubview:nativeWidgetView positioned:NSWindowAbove relativeTo:nil]; [nativeWidgetView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [nativeWidgetView setAutoresizesSubviews:YES]; nativeWidget->show(); // Show the window. [window makeKeyAndOrderFront:window]; [pool release]; QMacToolBar *toolBar = new QMacToolBar(); toolBar->addItem(QIcon(), QStringLiteral("Helloooo")); toolBar->attachToWindow(w); [window setToolbar: toolBar->nativeToolbar()]; w->show(); }