Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Why is a thread attempted to be created, when a bool value is accessed?

    Solved
    27
    0 Votes
    27 Posts
    3k Views
    M
    @J-Hilk thank you for explaining it. has one more guess of what you meant, that i was about to wild guess at. and no, i did not think what i wild guessed at would work, but worth a try.
  • TreeView

    Unsolved
    3
    0 Votes
    3 Posts
    269 Views
    R
    @Christian-Ehrlicher Thank you Chrisitan! I will look at it. thanks
  • using qobject_cast with QFutureWatcher

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    SGaistS
    @Juan-Garcia hi, What kind of properties do you have in mind ? Are you thinking of creating a lot of watchers ?
  • Why after linking the OpenCV libraries, Mat objects are still 'undefined'?

    Moved Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    JonBJ
    @jsulm said in Why after linking the OpenCV libraries, Mat objects are still 'undefined'?: Did you redefine "string" somewhere? That seems impossible since the whole of the source file is shown, and it has nothing other than system <...> includes. And the error message states it is matching against std::string..... The OP was only supposed to be using that sample code to get either cv::Mat or using namespace vc; Mat working.
  • CMake how to add QT += core gui widgets

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @JacobNovitsky Why don't you simply go to the documentation (https://doc.qt.io/qt-6/qapplication.html) to see what you have to add to CMakeLists.txt to be able to use QApplication? It's faster than asking in a forum...
  • Connecting problem <unresolved overloaded function type>

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    JonBJ
    @hskoglund said in Connecting problem <unresolved overloaded function type>: the parentheses are optional Wow, really? I never knew that!
  • QScrollArea

    Unsolved
    10
    0 Votes
    10 Posts
    691 Views
    jsulmJ
    @nagatofujirama said in QScrollArea: the group box itself should stretch Then use layouts: https://doc.qt.io/qt-6/layout.html
  • This topic is deleted!

    Unsolved
    10
    0 Votes
    10 Posts
    50 Views
  • How to get full stacktree?

    Unsolved
    1
    0 Votes
    1 Posts
    163 Views
    No one has replied
  • make QPlainTextEdit ignore scrolling

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    G
    I forgot to close this since I already fixed the issue even though it was a bit of a dirty fix. I just did: "connect(ui->plainTextLines->verticalScrollBar(), &QScrollBar::valueChanged, this, &MainWindow::handleLinesScroll);" and in the handleLinesScroll I just set the scroll bar to the value it was before. But it works flawlessly and I see no performance impact.
  • 0 Votes
    1 Posts
    375 Views
    No one has replied
  • Where should I put my fonts?

    Solved
    10
    0 Votes
    10 Posts
    639 Views
    C
    Embedding the fonts worked perfectly well. Thank you!
  • QTreeWidget-QTreeView::branch

    Unsolved
    2
    0 Votes
    2 Posts
    279 Views
    SGaistS
    Hi and welcome to devnet, Use the itemsExpandable property to disable it.
  • QTcpServer not listening on port

    Solved
    5
    0 Votes
    5 Posts
    681 Views
    D
    @SGaist Oh I see! Thank you, that was helpful. And you bring up a great point - I'll separate them into two applications. Thanks!
  • Could not build QClipboard base sample

    Unsolved
    9
    0 Votes
    9 Posts
    513 Views
    Pl45m4P
    @JacobNovitsky said in Could not build QClipboard base sample: it does nothing atm Like @SGaist mentioned, you somehow removed the @JacobNovitsky said in Could not build QClipboard base sample: return a.exec(); you had already in there before. This spins the Qt event loop. With the changes I made to your QLabel you should see at least the label on your screen.
  • QT Project refactoring / General questions about qt project structures

    Unsolved subdirs structure c++
    3
    0 Votes
    3 Posts
    618 Views
    SGaistS
    Hi and welcome to devnet, To your last question, yes you should move to CMake. There have been new features added in Qt 6 that will likely be of use for your project but that are only available through cmake. As for examples... maybe check some of the KDE's core projects. They already use CMake and some mix QML and C++.
  • QTableview row color vanishes when focus lost

    Solved
    3
    0 Votes
    3 Posts
    282 Views
    S
    @JonB thanks for your input :) I found the source of my problem. It's how I handle my data in the model. The data behind anotherModel->getLastEntryTS(clientId); changes whenever a client in the same tableview is selected. It basically only contains the selected client's data. So when the cursor is moved to a different row (another client), the old "green" row stays "green", because the view is not updated for that old row. But when the cursor moves back, the data for the "old" client isn't present anymore and therefore I can't read a correct timestamp from the model. Maybe my mistake helps someone else but I have my doubts^^
  • QAbstractItemModel and external data

    Unsolved
    2
    0 Votes
    2 Posts
    241 Views
    SGaistS
    Hi and welcome to devnet, Well owning or not depend on your use case. That said, in your case, it seems that the model will be a wrapper on top of your data. In that case, there's a need to implement the model functions to forward the manipulations to your data structure (for example new rows insertions, removal, drag and drop, etc). You should also add adequate APIs that allows external changes to the data structure to be propagate through the model (for example when some data is changed).
  • QSqlQuery execution resets transaction for no reason

    Solved
    5
    0 Votes
    5 Posts
    517 Views
    JonBJ
    @Seb-Tur TRUNCATE commits any existing transaction. DELETE FROM TABLE does not. I would expect ALTER TABLE auto_increment =1 to do same if it is a statement that alters a table's auto-increment column in your SQL. Any DDL-change-type statement is likely to do so.
  • This topic is deleted!

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