Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • 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
    306 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
    255 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
    270 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.
  • QCharts, "undeclared identifier"--what's wrong with it?

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    P
    You should add "QT_CHARTS_USE_NAMESPACE" first.
  • Modbusclient as a console application, "Stuck in Connectingstate loop"

    Solved
    5
    0 Votes
    5 Posts
    606 Views
    Z
    @JonB yes it worked now i need to change it to a function.
  • QTimer destructors

    Unsolved
    4
    0 Votes
    4 Posts
    659 Views
    P
    You simply need to defer starting the timer until after the thread is started because the thread has a different event loop and you want the timer running that event loop not the main thread's. Assume you have two objects, a QThread and a QObject-derived object you want to run in that thread, e.g. class MyWorker : public QObject. Create a slot MyWorker::OnThreadStarted and there is where you wire up the timeout and start the timer. The essential code to start the thread is below. // main thread application code MyWorker *worker_ = new MyWorker; // do not parent the QObject QThread worker_thread_; worker_->moveToThread(&worker_thread_); connect(&worker_thread_, &QThread::started, worker_ , &MyWorker::OnThreadStarted); connect(&worker_thread_, &QThread::finished, worker_, &QObject::deleteLater); worker_thread_.start(); N.B. The timer should be a member of MyWorker and parented to MyWorker. It's ok to create the timer in the main thread, e.g. in the constructor of MyWorker, but you must defer starting it until the thread is running. Somewhere else in your main application, perhaps a close event, you would typically stop and wait for (join) the worker thread: worker_thread_.stop(); worker_thread_.quit()
  • 0 Votes
    12 Posts
    2k Views
    J
    Okay, I had absolutely believed that I had tried making the call to my savePos() function to try to diagnose whether the signal had something to do with it, yet when I disable the connect()ion altogether and call it explicitly, now these APIs want to behave like good little children and do what they're supposed to. So, essentially I shot myself in the foot by handling this with modelAboutToBeReset(), which implicitly trashes the internal cache of visible indexes. D'oh! Argh, etc. Thanks for the help, folks.
  • Deployment win10

    Unsolved
    4
    0 Votes
    4 Posts
    570 Views
    JKSHJ
    windeployqt is for deploying Qt applications, as its name suggests. So, it can't be used to deploy a non-Qt app. @bence said in Deployment win10: Is there any other way to run the pure c++ code? You don't need any special tools for that. Just copy and paste the required MinGW DLLs into the same folder as your app. If you try to run your app but a required DLL is missing, you will get a pop-up dialog that tells you which DLL it needs.
  • How to get from QModelIndex to QTreeWidgetItem?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    nageshN
    @Dekken as suggested by @eyllanesc both the indexFromItem & itemFromIndex are protected fucntions..
  • Wrong default configuration of clang++ kit on OS X

    Solved
    4
    0 Votes
    4 Posts
    4k Views
    A
    just delete the projectname.pro.user and so you can select the kit installed ...easy to go from windows or linux to MacOS this way @NielsHolst said in Wrong default configuration of clang++ kit on OS X: I have found the reason why Qt Creator could not configure my project correctly: My .pro file depended on an environment variable. Moving from Windows to Mac and being unable to set an environment variable on the Mac (!), I resorted to set the environment variable from within Qt Creator. However, to be able to set the environment vaiable in Qt Creator, I had to first open the .pro file and let Qt Creator configure the project. That configuration could not be carried through correctly because the environment variable was not yet defined. Then when I defined the environment variable, and the .pro file should be OK, Qt Creator kept the faulty configuration. The way out was to rethink my project file and rid it of its dependency on the environment variable.
  • QTreeWidget: how to remove all items with widgets correctly?

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    sitesvS
    @JonB the same result. Memory leak increases with 100 KB/s rate... UPD: Hm.. 'Leak' has stoped on 8MB....
  • qt.qpa.xcb: could not connect to display

    Locked Unsolved
    3
    0 Votes
    3 Posts
    4k Views
    SGaistS
    Hi, Please do not open multiple threads with the same question. You are already getting answers in your other thread about the same subject. Closing this one
  • Qt6 from source on windows build. QtCreator issue

    Unsolved qt6
    10
    0 Votes
    10 Posts
    817 Views
    SGaistS
    Then start by running the configure script, it's a requirement in order to build qtbase at least.
  • QTreeWidget: get QTreeWidgetItem* by internal widget

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    sitesvS
    @VRonin said in QTreeWidget: get QTreeWidgetItem* by internal widget: You just need to reimplement paint() and fill a QStyleOptionButton to to show the button Hi! Is it possible to show ComboBox and CheckBox as you wrote?