Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QODBC does not work in 6.7.

    Solved
    5
    0 Votes
    5 Posts
    779 Views
    Christian EhrlicherC
    @JonB And here the bug report: https://bugreports.qt.io/browse/QTBUG-123478
  • QT 6.5.3 and conan/CMake - how to turn off LTCG and /GL in the release build

    Unsolved
    2
    0 Votes
    2 Posts
    576 Views
    Christian EhrlicherC
    LTCG and GL is not added in my system. Please show a minimal CMakeLists.txt to reproduce the issue. Maybe somewhere the interprocedural optimization is enabled where you did not notice it.
  • Including header breaks project

    Solved
    3
    0 Votes
    3 Posts
    196 Views
    R
    @Christian-Ehrlicher I should've clarified that. In Foo.h I include <Bar>. The <Bar> is found because it is provided by a qt module. In Baz.h I include Foo.h. The <Bar> is NOT found anymore. Telling me it's not found in Foo.h. Since this is a qt module, I do not have to provide an includepath via target_include_directories(). Just to see if it would've worked -> it did not. Not even explicitly telling cmake where to find the header worked Edit: Sleeping makes wonders! Baz.h is included in a different target which did not link against the specific qt module.
  • Render Gstreamer output within QtWindow

    Unsolved
    5
    0 Votes
    5 Posts
    783 Views
    S
    @Srioff We're working on qt5 we tried with this qmlglsink as well still we're not able to view any output.
  • QLineEdit won't show Chinese characters in popup menu

    Solved
    6
    0 Votes
    6 Posts
    366 Views
    Puppy BearP
    @Puppy-Bear mSearchBar->installEventFilter(this); first
  • Object as global variable

    Solved
    16
    0 Votes
    16 Posts
    1k Views
    MortyMarsM
    @Pl45m4 said in Object as global variable: Then you could go with a QStackedWidget as recommended by @SGaist . I see that @SGaist's QStackedWidget solution is unanimously approved. So I'm going to take a closer look :-) (since they don't fit on the screen anyway). I mean, this is no excuse ;-) Since you are the developer, you can make them fit ;-) My only excuse is that I'm just a modest occasional developer ;-) But the way my application is organised makes ergonomic sense. Thanks for your help :-)
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • QMouseEvent - is it press or release or drag?

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    Pl45m4P
    @Tom-asso said in QMouseEvent - is it press or release or drag?: I've designed ClickableLabel which can be used by these apps; this widget emits a signal with the QMouseEvent as payload, then various apps can processes the event in a the app-specific manner (this 'business logic' isn't necessarily contained in a Qt widget). The ClickableLabel has the event handler mousePressEvent. So why do you want to transfer the QMouseEvent within the signal? You can/should get the information you need (like mouse position) in the handler function and then emit a signal like void imageClicked(QPoint pos), where you send the event->pos() (or event->position() if Qt6+) from the handler to the receiving widget. As I've mentioned before, it's unusal to send a QEvent via signal-slots. (If I got it right what you are doing there) Edit: The example is already prepared for this: void ClickableLabel::mousePressEvent(QMouseEvent* event) { // add this QPointF pos = event->position(); // some further processing if needed // ... emit clicked(pos); // change signal to "void clicked(QPointF)" }
  • class Ui::MainWindow has no member named 'lineEdit'

    Solved
    9
    0 Votes
    9 Posts
    3k Views
    JonBJ
    @tsvigo2 No, @BITniki's solution weas correct. ui_....h must not be in source directory.
  • QMdiSubWindow incorrect size - some hint needed

    Solved
    5
    0 Votes
    5 Posts
    383 Views
    MasterBLBM
    I managed to find the reason. It was because verticalSpacer (the one which consumes space below Alphas To Overheat label) had set height to 40; when I put 0 there the window now is displayed in correct size. Funny thing though, I recall I had to set that height because of some reasons, but don't remember what exactly. @ChrisW67 Thanks for hints mate, and trying to help.
  • Custom context menu event not being caught for QToolButton

    Solved
    5
    0 Votes
    5 Posts
    453 Views
    S
    Starting from the old syntax, you should have written connect(ui->SettingsButton, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowContextMenu(const QPoint&))); Because ShowContextMenu is a member function of QtLauncher. Somewhere in the output (when running the application) you should have seen that this connect didn't work. With the new syntax this becomes connect(ui->SettingsButton, &QToolButton::customContextMenuRequested, this, &QtLauncher::ShowContextMenu); If you try to put in ui->SettingsButton instead of this, the compiler will complain immediately. By writing it out, hopefully you see that the slot is from the class QtLauncher and thus needs an object of this types. Unless you have other changes in your code, your current solution should not work. You showed that ShowContextMenu expects a QPoint. However, you are now handing it a QToolButton. Try to connect directly if lambdas are not totally necessary.
  • 0 Votes
    5 Posts
    569 Views
    C
    @ccamporesi definitely, I understand that. Thank you
  • Adding gap between QIcon and text in a QPushButton

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    S
    @JonB Yes, both approaches do work. I think I will I will just put blank space at start of the text to avoid unnecessary complexity.
  • QAbstractItemModel how emit signal about rowCountChanged

    Solved
    3
    0 Votes
    3 Posts
    284 Views
    M
    @JonB Thanks It's work: void IndicationsModel::addUuid(const QUuid &uuid) { m_uuidsSensors.append(uuid); beginInsertRows(QModelIndex(), m_uuidsSensors.count() - 1, m_uuidsSensors.count() - 1); insertRow(m_uuidsSensors.count() - 1); endInsertRows(); }
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • How to switch to opened bookmarks in QTerminal

    Unsolved qterminal bookmarks
    2
    0 Votes
    2 Posts
    383 Views
    Christian EhrlicherC
    I don't see how we can help here. This is a forum for devs programming with Qt/c++. You should ask the QTerminal devs.
  • QSqlTableModel insertRecord issue with AutoIncrement field

    Unsolved
    6
    0 Votes
    6 Posts
    440 Views
    J
    @Christian-Ehrlicher Thanks for your response, Christian. I read the documentation and thought isAutoValue and isGenerated, along with OnManualSubmit edit strategy, should provide a behavior similar to sqlite BEGIN TRANSACTION functionality. Indeed, if you read the documentation it is easily linked one functionality to the other. This is what we expect from QSqlTableModel OnManualSubmit strategy: sqlite> SELECT * FROM Test; 54|Test 2 55|Test 1 56|Test 2 57|Thing 58|Thing 59|Thing sqlite> BEGIN TRANSACTION; sqlite> INSERT INTO test (value) VALUES ('FROMCMD'); sqlite> SELECT * FROM Test; 54|Test 2 55|Test 1 56|Test 2 57|Thing 58|Thing 59|Thing 61|FROMCMD sqlite> ROLLBACK ...> ; sqlite> SELECT * FROM Test; 54|Test 2 55|Test 1 56|Test 2 57|Thing 58|Thing 59|Thing sqlite> I don't think this is approchable with QSqlTableModel without a workaraound. But nevertheless, thanks for your help.
  • paraFoam - Could not load the Qt platform plugin "xcb" in "" even though it was found.

    Unsolved
    3
    0 Votes
    3 Posts
    490 Views
    Pl45m4P
    @SGaist said in paraFoam - Could not load the Qt platform plugin "xcb" in "" even though it was found.: Something is off here, you write that you're on a Mac, yet you are showing errors that are pertinent to Linux. Also my first thought... but maybe it's "litterally". So a Linux VM running on some Mac hardware? But these are speculations :) Only @coopsido can clearify :)
  • I am confused with lupdate with different directory!

    Unsolved
    3
    0 Votes
    3 Posts
    290 Views
    SGaistS
    @QtTester hi, How did you confirm and are sure it's not going to be fixed ?
  • How to create a frameless window, but use Windows' system controls (min,max,close)

    Unsolved
    4
    1 Votes
    4 Posts
    845 Views
    SGaistS
    @Dynite while the module has not been ported to Qt 6, you might still leverage its content.