Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 456.9k Posts
  • CMAKE_MAKE_PROGRAM is not set.

    Unsolved
    2
    0 Votes
    2 Posts
    4k Views
    JoeCFDJ
    @Flaviu-0 said in CMAKE_MAKE_PROGRAM is not set.: CMake Error: CMake was unable to find a build program corresponding to "Ninja" Your problem is not qt related. https://ninja-build.org/manual.html cmake uses ninja in your case. Try to install ninja and you will be all right.
  • Proper resetting the transformation

    Solved
    4
    0 Votes
    4 Posts
    481 Views
    JoeCFDJ
    @jan-tosovsky after resize event, the image position has to be adjusted for center alignment. Otherwise, its position will not change.
  • qt.qpa.xcb: could not connect to display error

    Unsolved
    22
    0 Votes
    22 Posts
    23k Views
    D
    @jsulm yes you did but my problem is not about deploying. I cannot run my project on qt creator
  • How to use Qt translation resources?

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    B
    Actually the usual way is just deploying the translation files with the executable file. When you use windeployqt tool on Windows, some translation files will be copied just like the plugins by default. If you want to add them to the resource it is also possible. I think you can't use MACROs in qrc file. But you can use them in the .pro file and let it generate a qrc file for you. qm_file.files = $$[QT_INSTALL_TRANSLATIONS]/qtbase_bg.qm #can be multiple files qm_file.base = $$[QT_INSTALL_TRANSLATIONS] #add relative alias automatically qm_file.prefix = i18n RESOURCES += qm_file This will generate a qrc file qmake_qm_file.qrc in the build folder and add it to the Makefile. Then you would be able to access the file by :/i18n/qtbase_bg.qm.
  • Cannot see the Build & Run panel in my QtCreator

    Solved
    4
    0 Votes
    4 Posts
    257 Views
    K
    The Build & Run pages magically appeared again. Must have been something wrong with the kits afterall.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • My modbus connection status stay on connecting forever.

    Unsolved
    10
    1 Votes
    10 Posts
    1k Views
    Z
    @J-Hilk said in My modbus connection status stay on connecting forever.: connect(modbusDevice, &QModbusTcpClient::errorOccurred, this, [](QModbusDevice::Error error)->void{qDebug() << "error happened :" << error}); check this link you will find a solution: https://forum.qt.io/topic/125391/modbusclient-as-a-console-application-stuck-in-connectingstate-loop/3
  • setIcon crash when i'm using tableView

    Solved
    3
    0 Votes
    3 Posts
    281 Views
    F
    @eyllanesc Thank you! Indeed, the (2,2) case was empty...
  • Is "moc" actually helping to debug?

    Unsolved
    6
    0 Votes
    6 Posts
    852 Views
    kshegunovK
    @AnneRanch said in Is "moc" actually helping to debug?: Let me put this the silliest way - if I do not have an object BT_TabWidget constructed nowhere in the code then I am getting "you are missing destructor SOMEWHERE " from all of this. And I will not ask why I am not getting "no BT_TabWidget (object) found " instead., So I will go back to code and verify all BT_TabWidget CODE myself. When you compile stuff, the assembly is generated for the classes not the objects. There's no requirement that you must have an instance of some class to have the latter compiled into code. Or to put it the silliest way I can think of: classes are not objects, nor vice versa. As far as C++ goes, all virtual functions shall be defined if they're not a pure virtual for the build process to succeed, and if you go through your code I'm sure you're going to find out that this particular class has a destructor, which was declared (hence it's an override due to its base class' destructor being virtual), and that destructor hasn't been defined. @wrosecrans said in Is "moc" actually helping to debug?: I don't have any children. Can you tell me where my son Gary isn't? It's impossible to point to a specific place and say that's where something isn't. lol! If it doesn't exist, it isn't everywhere. We could argue some quantum mechanics about that ... ;)
  • Redirecting all cout statements to textEdit box

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    Kent-DorfmanK
    https://stackoverflow.com/questions/18086193/redirect-stdout-stderr-to-file-under-unix-c-again top link in google search. moving the text from the redirected stream is left as an exercise for the reader. Hint involves a stream reader and a signal linked to the TextEdit::SetText() slot.
  • Update / repaint a QWidget while it is hidden

    Solved
    5
    0 Votes
    5 Posts
    3k Views
    S
    This is solved using self.subtext.repaint() right after the clear() for the QTextEdit, as well as with using a key indicating whether or not the update is finished. We test this key in the paintEvent of the QFrame to effectively paint the new background only when everything is ready.
  • 0 Votes
    5 Posts
    2k Views
    T
    @JonB yes the path to the .dll ist right - the weird thing is that one function works fine but the others won't The error I am receiving is: Unkown error.
  • This topic is deleted!

    Unsolved
    12
    0 Votes
    12 Posts
    45 Views
  • QRect and QAction

    Solved
    16
    0 Votes
    16 Posts
    1k Views
    SGaistS
    Then I think you took the problem from the wrong end. You seem to want to force a conventional GUI to be adapted to an unconventional input device. I think you should rather design your application with unconventional widgets that fits the input device. From the looks of it, your menu's entries will get highlighted one after the other and the user shall click on the button in order to select the action but how will the user get to this menu in the first place ? And even before that, what will be the goal of your application ?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Remove QTableWidget header separator line

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    H
    @SGaist Thank you, the code works now I will try integrating it into my project.
  • Copying external dlls to destination directory

    Solved
    3
    0 Votes
    3 Posts
    309 Views
    U
    @Uday-More said in Copying external dlls to destination directory: copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR) The command has to be changed to copyQtdata.commands += $(COPY_DIR) /f $$shell_quote($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR) Note : shell_path has been changed to shell_quote. It works.
  • Disable IME for QML TextField

    Unsolved
    1
    0 Votes
    1 Posts
    258 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • QGroupBox, 2 Radio Buttons, not big enough

    Unsolved
    4
    0 Votes
    4 Posts
    275 Views
    SPlattenS
    @JoeCFD , thank you for the response, my widgets are manually positioned and added to groups in code. Yes, I create the QGridLayout first then a QGroupBox, I've resolved this issue now.