Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Subclassing QIODevice

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    P
    @Christian-Ehrlicher said in Subclassing QIODevice: if (port1.setBaudRate(9600)) <<-- here you try access even if open failed I fixed this, but problem stays... Source code from topic header was updated to. [image: image.png] Why did it call QIODevice::isSequential but not my own implementation?
  • QPushbutton

    Unsolved
    10
    0 Votes
    10 Posts
    865 Views
    J.HilkJ
    I answered this previously, with an examlple for QFrame as base class here: https://forum.qt.io/topic/96728/change-button-color/3 You should be able to adjust it for QPushButton.
  • QStyledItemDelegate

    Unsolved qstyleditemdele click edit
    5
    0 Votes
    5 Posts
    757 Views
    JonBJ
    @charry Yes, you are normally supposed to double-click to edit a cell (one click to select the cell, double-click to edit the cell). If you want single-click to edit, you should look at, say, QTableView::setEditTriggers(QAbstractItemView::AllEditTriggers). See if one of those values do what you want? If not, have a read through e.g. https://stackoverflow.com/questions/18831242/qt-start-editing-of-cell-after-one-click, there are other possibilities there. Or further hits via Google qtableview click edit.
  • std vector, QVector and fields..

    Unsolved
    29
    0 Votes
    29 Posts
    10k Views
    JonBJ
    @J-Hilk Wow! They think of everything! I wonder if that would accept -fconstexpr-steps fibonacci(25) ;-) OK, enough now, thanks!
  • How to change 32 to 64 bits?

    Unsolved
    2
    0 Votes
    2 Posts
    491 Views
    jsulmJ
    @TomNow99 Your explanation isn't really clear. Do you open in QtCreator? What window do you mean? Kit selection? If you want to build for 64bit you need Qt build for 64bit and a compiler for 64bit. So, simply install Qt 64bit version.
  • QLocale::system()

    Unsolved
    4
    0 Votes
    4 Posts
    567 Views
    G
    @dheerendra , could you please provide your feedback on this issue?
  • Bluetooth LE Peripheral on Windows UWP

    Unsolved
    3
    0 Votes
    3 Posts
    299 Views
    R
    Microsoft Windows 10 10.0.17763 Ok i will post there, thank you!
  • Undef. ref. __emutls on Qt 5.15.1 static Windows

    Unsolved static build
    1
    0 Votes
    1 Posts
    446 Views
    No one has replied
  • Install qt 5.15.1 in my system

    Unsolved
    6
    0 Votes
    6 Posts
    598 Views
    B
    See http://download.qt.io/official_releases/qt/5.15/5.15.1/OFFLINE_REAMDE.txt Due to The Qt Company offering changes, open source offline installers are not available any more since Qt 5.15. Read more about offering changes in the https://www.qt.io/blog/qt-offering-changes-2020 blog. If you need offline installers, please consider our new Qt for Small Business offering: https://www.qt.io/blog/available-now-qt-for-small-businesses
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    15 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Why can't QString built from a QJsonDocument be set in a Q_PROPERTY?

    Unsolved
    15
    0 Votes
    15 Posts
    764 Views
    K
    @Christian-Ehrlicher Awesome, thanks! I assumed the designer was updated in the backend magically for Q_PROPERTY values haha. I'll try it out when I get home later today. Yah it was difficult to find documentation, because I was searching for guides using the wrong word... but then I started typing "Qt Custom Widget Property Extension" and that turned up the correct results :).
  • OSX clang link error

    Solved
    3
    0 Votes
    3 Posts
    542 Views
    SGaistS
    Hi and welcome to devnet, Usually the include path of macOS headers is a good tip to what framework the header belongs to.
  • Question about signals

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    JonBJ
    @Inzinejkr said in Question about signals: @Christian-Ehrlicher said in Question about signals: use QObject::sender() and try to cast it to a QCheckBox I just get QCheckBox(0x1f8e510)? He wants you to go: QCheckBox *checkbox = qobject_cast<QCheckBox *>(QObject::sender()); if (checkbox != nullptr) { if (checkbox->checked()) saveText(checkbox->text()); } Read up qobject_cast<>().
  • Project using Botan fails to compile, with hundreds of errors.

    Solved
    4
    0 Votes
    4 Posts
    400 Views
    swirlS
    Nevermind, fixed it. Turns out I was missing a Botan file and reinstalling the package fixed it Edit: forgot to mention this, but I had a file called "string.h", and qmake added the project directory as an include path, which added to some of those errors. Renaming it also fixed it.
  • How to permanantly change .pro settings

    Solved
    4
    0 Votes
    4 Posts
    437 Views
    JonBJ
    Now that this question/thread is solved, I feel like saying: until I read this this I had no idea that my (recently-created) Qt project was compiling with C++ 11 rather than a later one.... It would be a different thread if I were now to dare ask what I am missing out on. Because glancing through the changes I see a progression to yet more esoteric/complex constructs. But I have learned that if I move all the way up I should be able to write essentially all my code with auto and not have a clue what types anything are... :D And to think I finally managed to move off Python and back to C++, partly because I was fed up with Python's lack of source code explicit typing.
  • Use QSqlQueryModel with Qt Remote Objects module

    Unsolved
    1
    0 Votes
    1 Posts
    122 Views
    No one has replied
  • geocode() form QGeoCodingManager class not returning anything after passing an address.

    Unsolved
    8
    0 Votes
    8 Posts
    883 Views
    C
    @jsulm Sorry about that, will make sure to change that next time. I know it never enters either one of handleError() or handleFinish() because in my QML i have, Component.onCompleted: { MapFunctions.getmyaddress(); console.log("Coordinate:", MapFunctions.getlatitude()); console.log("Coordinate:", MapFunctions.getlongitude()); } for the application window. If I set values in those handle() functions they do not get reflected in the console log. For example I set longitude= 14 in handleFinish() and I comment out the other code and this has no effect on the output. For handleError() the values do not get set to -1 so it doesn't get called.
  • qInstallMessageHandler() add object method. How?

    Solved
    4
    0 Votes
    4 Posts
    986 Views
    JonBJ
    @bogong Having glanced through that, I see it goes qInstallMessageHandler(ALogger::mWriteToLog); Which is a static function, exactly what you said you did not want! Note that it does not go qInstallMessageHandler(oLogger->mWriteToLog);
  • Insert Column into Excel Spreadsheet

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    VRoninV
    QXlsx doesn't even know about formulae. It does, it just doesn't calculate them The problem is not the insertion itself but it's updating the formulas after an insertion. You'd probably need to insert an engine that can at least read the formulas before even attempting at updating them. This was the stopper in implementing the functionality in the library