Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • converting QVariant to QList

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    mzimmersM
    @JonB I just spoke with the author of the back end -- we had a misunderstanding about the contents of the message. To answer your question, toList() does return a size of 1. But it's merely a UUID, not an actual equipment object as I'd expected. I think my question is answered, but I'll hold off on closing this topic until I do a bit more experimentation. Thanks...
  • 0 Votes
    2 Posts
    530 Views
    Pl45m4P
    @giorgik63 said in How to read selected value in widget properties in Qt Designer?: value selected in a list of elements shown in a property of a custom widget placed in Qt Designer Can you explain or show what list you mean? Edit: Seems to be related to this topic and will probably get answered there. https://forum.qt.io/topic/144783/how-to-manage-choice-item-property-my-plugin-in-qt-6-5
  • Messages seen in debug log

    Unsolved
    2
    0 Votes
    2 Posts
    229 Views
    mrjjM
    @Perdrix Hi No reason for concern. Its just libpng that dont agree with photoshop. I have not seen any side effects besides the warning is a bit annoying :) Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image.
  • Qt configure not finding header file(s)

    Unsolved
    1
    0 Votes
    1 Posts
    213 Views
    No one has replied
  • " QDialog::Accepted" is doesn't work.

    Solved
    16
    0 Votes
    16 Posts
    4k Views
    Pl45m4P
    @JonB Yes, it's him. Must be "Nobody Is Perfect (The End)".
  • QLabel->setText with access violation

    Unsolved
    2
    0 Votes
    2 Posts
    290 Views
    JonBJ
    @Arantxa If you got an "Access violation" you sre supposed to run under a debugger and look at the stack trace when it happens, then you would know where the problem is. Then I tried to pass a constant QString by reference as: const QString test = tr("Add files with extension:"); m_pLabelTitle1->setText(&test); This is not passing something by reference! It is passing it by pointer/address, which is quite different. And QLabel::setText() does not accept a QString * so it won't compile. Standard C++. First verify that m_pLabelTitle1->setText("Hello") does work. Then so far as I can see there is no reason why setText(tr("Add files with extension:")); would not work if const QString test = tr("Add files with extension:"); m_pLabelTitle1->setText(test); does work. As I say, check in debugger.
  • how to detect if a widget is destroyed?

    Solved
    9
    0 Votes
    9 Posts
    3k Views
    Atr0p0sA
    @JonB I got it. Much appreciated, sir!
  • Onlu two Qstyle styles in CLion but three in Qt Creator

    Solved
    5
    0 Votes
    5 Posts
    566 Views
    P
    @Abderrahmene_Rayene Thank you, that's really helpful.
  • Online Qt Playground

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    N
    @jsulm online C++ playgrounds does not ship Qt... Would be nice to be able to "script" Qt stuff online to share ideas or implement quick POC's
  • Get the index of an item from QTreeView

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    JonBJ
    @vijaychsk You could keep a "lookup table/map" as @Kent-Dorfman says. But potentially that could be "costly" to maintain, especially if the tree is large/deep. There are two ways you can do it just from the information already held in the tree model. Do like QFileSystemModel does it. It defines a role QFileSystemModel::FilePathRole Qt::UserRole + 1. That role returns the full file path from each node/leaf. You can then search for this full path (e.g. via @jeremy_k's QAbstractItemModel::match()). This is simple but "expensive": the tree does a lot of looking back up at parentage (unless you do some extra work) to generate each item's full path to compare. Just look down the tree for each element in turn from the desired path. For example, if looking for /a/b/c, first find a at top-level, then b among its children, and finally c among b's children. You could do that easily yourself from model's nodes' children, or maybe from QAbstractItemModel::match() without the Qt::MatchRecursive flag being set in Qt::MatchFlags flags.
  • QMqtt5 extracting response topic from received message

    Unsolved mqtt
    1
    0 Votes
    1 Posts
    310 Views
    No one has replied
  • Install old Qt-5.9.9 opensource

    Moved Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    J
    @JNBJNB Since you mentioned that you want to use Qt-5.9.9 for building a software in your public laboratory, you should select the open source license option when prompted by the installation tool. The open source license allows you to use, modify and distribute the software freely in accordance with the terms of the license agreement. If you are unsure about which license to choose, you can refer to the Qt licensing page for more information: https://www.qt.io/licensing/ I hope this helps. Let me know if you have any further questions!
  • Using an external .json file for configuration

    Unsolved
    13
    0 Votes
    13 Posts
    3k Views
    Christian EhrlicherC
    @Clone45 said in Using an external .json file for configuration: after I added the resource files to qt_add_executable set(CMAKE_AUTORCC ON) Yes, this is also possible because you enabled AUTORCC.
  • Connection timed out when using QTcpSocket

    Unsolved
    7
    0 Votes
    7 Posts
    665 Views
    N
    @Kent-Dorfman even if I open the required ports to the apache server in my router?
  • New type of SIGNAL/SLOT connection issue

    Solved
    3
    0 Votes
    3 Posts
    267 Views
    K
    @mpergand you are right, I tried with qOverload<void> and since now only for signal parameter. Thank you!
  • QWebEngineView Class

    Unsolved
    8
    0 Votes
    8 Posts
    526 Views
    Christian EhrlicherC
    @Kris-Revi said in QWebEngineView Class: but in Qt Maintenance i don't see MSVC You can select the desired Qt library (MinGW or MSVC) in there. Don't know what this has to do with Visual Studio Code (which is an IDE) though.
  • Have troubles with QCommandLineParser

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    JonBJ
    @tubbadu There must/ought to be a way (putenv(SOME_ENV_VAR)?) of switching off Qt grabbing its own arguments? Which you might want here? Else Qt apps could never see generic arguments, maybe this is a QGuiApplication thing not QCoreApplication?
  • QComboBox doesn't works change event

    Solved
    12
    0 Votes
    12 Posts
    2k Views
    Christian EhrlicherC
    @JonB Maybe a linker error (vtable) - don't know.
  • QAction Icon not displaying

    Solved
    3
    0 Votes
    3 Posts
    216 Views
    PerdrixP
    @Christian-Ehrlicher Bingo! I had set it in Designer but it had picked up the filesystem file location not the location of the resource... Now fixed. Thank you
  • Qt6.5.0 and ibus (Ubuntu)

    Unsolved
    28
    1 Votes
    28 Posts
    13k Views
    F
    I googled around and could not find a solution. Then I switched to Wayland and the code does not crash anymore. Has Qt6.5 switched to Wayland completely? However, the ibus message is still there, but does not matter.