Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 0 Votes
    3 Posts
    2k Views
    SGaistS
    Hi, To add to @KH-219Design, since 6.5, the default backend has been set to ffmpeg.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    5 Posts
    3k Views
    NarutoblazeN
    @mpergand Did not worked : setSectionResizeMode(QHeaderView::Fixed); setDefaultSectionSize(10);
  • 0 Votes
    2 Posts
    4k Views
    C
    From the Qt documentation (qt6), QTabWidget::setCornerWidget: says: Note: Corner widgets are designed for North and South tab positions; other orientations are known to not work properly. That means they do work, but are messy to and inconvenient to use. Here's a way to use QTabWidget corner widget on the side: As already noted in the question, setting a corner widget while tabs position is West or East, causes a small gap before the tabs without anything appearing there. But if you set QTabWidget's corner widget minimum size, it will appear, which solves a problem but causes another, because now I need to calculate that size myself, or make room for my corner widget. Here's an MRE that I used to try and figure how to get that empty corner size: QTabWidget *t = new QTabWidget(); //I needed the stacked widget so I can use its geometry to calculate the empty corner size QStackedWidget *stack_widget = t->findChild<QStackedWidget*>("qt_tabwidget_stackedwidget"); t->setMinimumSize(800,600); t->addTab(new QWidget(),"Tab1"); t->addTab(new QWidget(),"Tab2"); t->addTab(new QWidget(),"Tab3"); t->addTab(new QWidget(),"Tab4"); t->setTabPosition(QTabWidget::TabPosition::West); QToolButton *button1 = new QToolButton(); button1->setIcon(QIcon(":/icons/collapse.png")); t->setCornerWidget(button1,Qt::TopLeftCorner); t->show(); //width is equal to where the stack widget starts (x coordinate) //height is equal to where the tab bar starts (y coordinate) //I subtracted 1 from stackwidget's x because it simply looked better t->cornerWidget(Qt::TopLeftCorner)->setMinimumSize(stack_widget->geometry().x()-1, t->tabBar()->geometry().y()); //checking related widgets geometries /*qDebug()<<"cornerWidget geo"<<t->cornerWidget(Qt::TopLeftCorner)->geometry(); qDebug()<<"tabBar rect"<<t->tabBar()->tabRect(0); qDebug()<<"tabBar geo"<<t->tabBar()->geometry(); qDebug()<<"stackwidget geo"<<sw->geometry();*/ Here's how it looks, I used a custom icon: [image: u2kMS.png] If you need more space for the corner widget, you'll need to move the tab bar, because corner widget will cover it, you can do that using stylesheet. See this: Qt Style Sheets Examples: Customizing QTabWidget and QTabBar. Here's an example of stylesheet: t->setStyleSheet("QTabWidget::tab-bar " "{" "top: 50px;" /* push down by 50px */ "}"); Here's how it looks with that being the only addition and change to my MRE: [image: GYKGX.png] Suggestion: QTabWidget::paintEvent might be a better solution.
  • Image not loading

    Unsolved Mobile and Embedded embedded qt raspberry pi 3b watch qt6.5.0
    3
    0 Votes
    3 Posts
    2k Views
    JoeCFDJ
    @Raghav said in Image not loading: import QtQuick.Layouts 1.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 <=version number is dropped in Qt6 import QtQuick.Controls 2.15 <=version number is dropped in Qt6 simply import QtQuick.Layouts import QtQuick.Controls
  • 0 Votes
    2 Posts
    2k Views
    I
    @Imeshsps This issue does not seem to come with qt-everywhere-src-6.5.0-rc. I was able to succesfully compile it.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • QtJambi 6.5.0 available

    Language Bindings java qt6.5.0 ui design language bindings
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Qt6.5.0: Android: Can't create main activity

    Unsolved Qt 6 qt6.5.0 android macosx
    3
    0 Votes
    3 Posts
    3k Views
    V
    @TheoSys said in Qt6.5.0: Android: Can't create main activity: Qt5.15 app for Android to Qt6.5.0 Exactly the same problem after moving app from Qt5.15 Qt6.5