Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.2k Posts
  • 0 Votes
    2 Posts
    164 Views
    JonBJ
    @KASULA Not really: get rid of all this "thread handling" stuff, and saving data etc., and see how the dialog behaves. Since you (seem to) intend to create a brand new dialog each time, try setting the Qt.WA_DeleteOnClose flag/attribute on the dialog, does that make any difference? def return_cancel(self,new_form): new_form().reject() Do you press Cancel in your timings? Because this code is wrong.
  • QDoubleSpinBox with Hexadecimal value

    Unsolved
    3
    0 Votes
    3 Posts
    476 Views
    JonBJ
    @sitesv QDoubleSpinBox deals in doubles rather then the int of QSpinBox, and it does not have the "integer base" option of the latter. Floating point values do not offer the ability to use a non-10 base supported in integers. You may have to roll your own. I think you would be better heading out from a QSpinBox-type with an int64 value than QDoubleSpinBox's double. See e.g. How to subclass QSpinBox so it could have int64 values as maxium and minimum, the solution there does not look like too much code. There is also https://stackoverflow.com/a/26581445/489865 if you need help on the hex digit side of things. Further examples are available by Googling qspinbox int64. P.S. Thinking about it, double cannot represent the full range of values for uint64 since both are 64-bits big! So if you are wanting to use the full range you will have abandon double as your type!
  • QUrl::toLocalFile returns a path with an unexpected leading slash

    Solved
    18
    0 Votes
    18 Posts
    3k Views
    M
    @J-Hilk said in QUrl::toLocalFile returns a path with an unexpected leading slash: The colon is used as the separator in “HFS paths” and the slash is used as the separator in “POSIX paths” so there is a two-way translation It is like that since the begining of OSX
  • Dockerized implementaion of person tracking

    Unsolved
    1
    0 Votes
    1 Posts
    243 Views
    No one has replied
  • Insert row at the end of TableView

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    JonBJ
    @Karoluss96 said in Insert row at the end of TableView: Well...Your 1st suggestion is correct but, I need to do one small thinks:... delete "+1" and goes work! Is this addressed to me? I certainly did not put in any + 1 in self.model4.insertRow(self.model4.rowCount()) suggestion! rowCount() is already the index of the next row beyond the total you have so far, and that is where you want to insert at. I don't know whether rowCount() + 1 would even be acceptable to insertRow(), quite possibly not.
  • How to decouple a QStandardItemMode from a QTableView?

    Unsolved
    2
    0 Votes
    2 Posts
    166 Views
    JonBJ
    @Lee908 setModel(nullptr) should indeed remove the QTableView from having slots attached to the QStandardItemModel, and setModel(myModel) again should set it to receive signals anew, without "doubling". However, "the signal QStandardItemModel::itemchanged is always triggered twice": attaching a view to a model connects its slots to model signals, it should not have anything to do with how many times any signals are triggered, which is a model-only thing. Can you reproduce this behaviour in a small, standalone sample?
  • PyQt5 extended support for FOSS projects

    Solved foss
    9
    0 Votes
    9 Posts
    1k Views
    jsulmJ
    @buhtz I don't see any bashing from @SGaist in this thread
  • QChart: invalid use of incomplete type 'class QChartView'

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    JonBJ
    @Alexander-Maltsev I was just trying to help, getting the facts straight. I am glad you have it working now.
  • Can't unset Qt::WA_TransparentForMouseEvents attribute

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    B
    @jsulm Yes you are right, for some reason I did not think it would cause any problems but anyways, I tried this void MainWindow::toggleFocus() { focusable = !focusable; ui->textEdit->append("setting transparent "); ui->textEdit->append(focusable ? "true" : "false"); setAttribute(Qt::WA_TransparentForMouseEvents, focusable); hide(); QTimer::singleShot(1000, this, &MainWindow::hideShow); } void MainWindow::hideShow() { show(); } still no luck.
  • App Crashed on run

    Solved
    7
    0 Votes
    7 Posts
    383 Views
    JonBJ
    @aim0d OK, but still might be a good opportunity to learn how the debugger works and where the stack view pane is among its windows, as that will be very useful for your future.
  • How to print all tableview rows in qt using Thermal printer?

    Unsolved
    2
    0 Votes
    2 Posts
    227 Views
    JonBJ
    @Ramkumar-Mohan I don't see how a "thermal" printer is relevant to anything? I'm Printing row separately in tableview. Don't know why/what the significance is. There are several approaches to "printing" what is in a QTableView, depending on what your objective is. If you Google qtableview print you can look through the various hits and decide which approach you are looking for.
  • Program with a GUI crashes when add .h and .cpp files

    Unsolved
    6
    0 Votes
    6 Posts
    626 Views
    JonBJ
    @Pordo said in Program with a GUI crashes when add .h and .cpp files: I resolved it changing the variable type to float. That sounds a lot more useful :) Just a comment: consider using double instead of float for this, other constants and arithmetic. In C all floating point calculations are done in double-precision anyway (at least I think/thought this was the case). Using float instead of double throws away precision for no good reason. The only time I would use floats is to save space if I had millions of them....
  • libcurl corrupted attached file

    Unsolved
    5
    0 Votes
    5 Posts
    469 Views
    F
    I solved the issue with dfandrich suggestion, ising curl_mime_encoder: part = curl_mime_addpart(mime); QString logo=QApplication::applicationDirPath()+"/Images/logoIgn.jpeg"; curl_mime_filedata(part, logo.toStdString().c_str()); curl_mime_encoder(part, "base64");
  • macOS - QT application crash after going out of sleep

    Unsolved
    6
    0 Votes
    6 Posts
    539 Views
    jsulmJ
    @TalOz You could try to reopen that ticket and provide your description.
  • passing multiple options to qterminal

    Unsolved
    12
    0 Votes
    12 Posts
    843 Views
    JonBJ
    @AnneRanch said in passing multiple options to qterminal: but this "native window" exists physically and I should be able to access it. it is time to concentrate on access to "NATIVE WINDOW"... I have tried to explain several times that you will not be able to access the output you see in a terminal --- whether from xterm or qterminal --- from an external program, such as your Qt application. That output goes into the terminal's output window and is not available to "see" or "read" elsewhere, even though you would like it to be. But I will leave you to your investigations. When you come to the same conclusion you have my reply at https://forum.qt.io/topic/139374/another-xterm-qtextedit-issues/10 which shows what you will need to do if you do wish to access the output from bluetoothctl and has code showing how to do it and what the final output will look like.
  • Qt application size optimization

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    kkoehneK
    You should also run strip on your binary.
  • Plotting chart using lots of data

    Solved thread chart chartview
    8
    0 Votes
    8 Posts
    2k Views
    jsulmJ
    @StudyQt1 said in Plotting chart using lots of data: Is there a generic way to decide? Use a profiler. If you're using GCC you can use https://www.thegeekstuff.com/2012/08/gprof-tutorial/ Easier way which is often enough is simply to put debug output at the beginning and end of your methods/functions with timestamps and then check the output of your application while it is running.
  • Unwanted Windows Command Prompt when using QSignalSpy::wait()

    Solved
    4
    0 Votes
    4 Posts
    300 Views
    jsulmJ
    @JKappes said in Unwanted Windows Command Prompt when using QSignalSpy::wait(): It's better for UX to wait I disagree - you're blocking the UI, this can be frustrating for the user. But its you application.
  • How to use QSound on Visual Studio?

    Solved
    3
    0 Votes
    3 Posts
    562 Views
    CesarC
    Thank you, this did work, also the include need is #include <QtMultimedia/qsoundeffect.h>
  • How to effectively overwrite entire folders in Qt C++?

    Solved
    5
    0 Votes
    5 Posts
    480 Views
    H
    @SGaist Thank you! I did it using QDir::entryInfoList but I guess QDirIterator would be much better.