Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Streaming and showing video using a QVideoWidget object + FFmpeg

    Solved
    7
    0 Votes
    7 Posts
    3k Views
    JoeCFDJ
    @Ximenes Good for you. Is it possible to manipulate or change the streaming settings?
  • How to create a drag and drop application?

    Unsolved
    5
    0 Votes
    5 Posts
    456 Views
    M
    @SGaist Maybe I expressed myself badly. I meant that I'm going to use opencv to create a graphical application that uses its functions in interconnected block diagrams.
  • Using flags to stop triggered actions

    Solved
    7
    0 Votes
    7 Posts
    528 Views
    Pl45m4P
    @JonB I picked the wrong function name :) It should be some function to set val somewhere in the code, do the checking and then emit the signal and not a function which is the slot connected to changed. Edited my initial post :)
  • Failed to start VTE child process "X" launched by x-terminal-emulator process "Y"

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    ivanleonczI
    Awesome. I found it (pretty easy): Edit > Preferences > Environment > then setting the path to Gnome Terminal [image: 733d8404-cb13-40d5-9c24-c6f13ab86691.png] Easy to find the path of the binary as well (if anyone wonders how to do it): $ whereis gnome-terminal gnome-terminal: /usr/bin/gnome-terminal.wrapper /usr/bin/gnome-terminal /usr/bin/gnome-terminal.real /usr/share/man/man1/gnome-terminal.1.gz And Gnome Terminal displays the program in parallel with another terminal software: [image: 0747f7da-bb01-4578-aa3c-ebdfa2b72453.png] I think everything is fine here. Thank you for your willingness to help, people.
  • Trying for force display of QTableWidget horizontal header

    Solved
    2
    0 Votes
    2 Posts
    202 Views
    PerdrixP
    @Perdrix I got it to display the column headers by simply calling imageList->setColumnCount(count); with the correct number of columns
  • Better way to close old widget ui and open new widget ui

    Solved ui form show hide
    5
    0 Votes
    5 Posts
    865 Views
    T
    Thank you all ! I think @JonB 's suggestion will do the job since my goal is more comprehensive.
  • How use translation files of another project?

    Unsolved translation
    3
    0 Votes
    3 Posts
    523 Views
    S
    A QTranslator handles translations from a single translation file. After that the QTranslator is installed for the application. If you have multiple QTranslators installed translations will be looked up from newest to oldest.
  • 0 Votes
    1 Posts
    560 Views
    No one has replied
  • Create stacked icon using font awesome in Qt

    Unsolved
    7
    0 Votes
    7 Posts
    745 Views
    ScleaverZer0neS
    @SGaist Something like that.
  • 0 Votes
    10 Posts
    758 Views
    M
    @Christian-Ehrlicher @Christian-Ehrlicher @JonB I know the reason, perhaps because the main program was deconstructed too quickly, and the program had already closed before the signal could be executed :)
  • link error with export a class with init in class

    Unsolved
    7
    0 Votes
    7 Posts
    810 Views
    H
    @jsulm Could you give me some advice?
  • Compile cant find QMainWindow

    Unsolved
    4
    0 Votes
    4 Posts
    564 Views
    T
    How can I use memcheck? It doesn't start.[image: 19d49451-df3d-47aa-855d-5dfe455b3f6a.PNG] I wanted to do it manually because I wanted to use Valgrind to find memory leaks.
  • Added QMysql plugin to Qt Creator project on MacOS Ventura 13.4

    Solved
    53
    0 Votes
    53 Posts
    23k Views
    B
    @hskoglund It seems I got QMySQL plugin added to Qt Creator! Thanks a lot everyone! @Christian-Ehrlicher @hskoglund @SGaist However now I have new problem. But I think I should create new topic for this. Anyway thank you very much and have a great day!
  • Draw digits in the QSystemTrayIcon

    Solved
    6
    0 Votes
    6 Posts
    486 Views
    G
    @SGaist Now also the drawing of the traybar icon works well. Thank you. P.S. KStatusNotifierItem is a good object (uses dbus). Probably I use it also badly, it seems to me that it also provides the icon overlay. PP.SS. Working on this thing brought up various issues that I fixed, events no longer spawning, wrong object destructions, etc. . In the end, a lot in the end 😅 , it was a good thing, it was a jump from 80% to 99% of things functioning 🔮 . As a big deal I think I have only occasional crashes left, probably timers that don't start and stop correctly.
  • QImage doesn't seem to support older GIF images?

    Solved
    7
    0 Votes
    7 Posts
    598 Views
    N
    @Chris-Kawa Ah that is embarassing, yes I hadn't added that plugin directory .. that's exactly the issue. Sorry to waste both of your times , thanks for the help also though :)
  • How to quit an eventLoop connect to a signal containing arguments?

    Solved
    9
    0 Votes
    9 Posts
    695 Views
    JonBJ
    @Ylvy It is not clear why you want to block till a button is clicked from a QWidget. In any case is QDialog and exec(), a modal dialog, not what you want here?
  • 0 Votes
    5 Posts
    526 Views
    SGaistS
    Did you remove the license file from your computer ?
  • Module machine type 'x64' conflicts with target machine type 'x86'

    Solved
    6
    0 Votes
    6 Posts
    3k Views
    Chris KawaC
    @Daniella cmake --install . will only install the release part of the build. Run cmake --install . --config Debug after that to also install the debug part.
  • 0 Votes
    2 Posts
    3k 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.
  • Extra QPen plot when doing realtime plot in qcustomplot. how to remove it .

    Unsolved
    1
    0 Votes
    1 Posts
    155 Views
    No one has replied