Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Class QDataStream has no member named startTransaction

    Solved
    3
    0 Votes
    3 Posts
    297 Views
    J
    Thanks, I checked in the terminal if qmake -v was 5.11 and it was, in creator checked if it was automatically detected and it was, however, in the KITs tab, the old version was selected so I selected the new version. At the end, the project did not compile, there were errors with QT configuration and gcc libraries. I assumed this happened because of the way I installed 5.11 using ppa in Ubuntu. Based on this issues, I decided to download the QT open source .run file and start a new QT Creator configuration using the QT wizard and now it is working. Based on the answer @Christian-Ehrlicher provided, l read carefully about QT versions settings and this helped me to find other settings I was missing.
  • QComboBox aligment issue

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    AndyBriceA
    @Christian-Ehrlicher said in QComboBox aligment issue: The code had a little glitch. It was 4 different files, rather than 1 file. Did you try it with a QGridLayout? Yes. Same issue. [image: 13b6dd7f-5cc7-4213-941a-3c7277e8e01f.png] It does work fine on Linux It is fine on Windows as well. therefore I would suggest you to create a Qt bug entry I will. Thx.
  • QTreeView drag/drop handling

    Unsolved
    21
    0 Votes
    21 Posts
    11k Views
    Oak77O
    @SGaist Lost am I :-). I see you pointing out python bytes vs. QByteArray, makes sense, I'll study that. Thank you for caring to comment my rookie issues.
  • 0 Votes
    6 Posts
    2k Views
    SGaistS
    I think that you are looking for qWaitFor.
  • 0 Votes
    10 Posts
    635 Views
    SGaistS
    @PythonQTMarlem said in Assign the same font color and the same background color to all QLineEdit components - how does that work?: class QAcccessibilityEdit(QLineEdit): def focusInEvent(self, QFocusEvent): self.setStyleSheet("background-color: " + GlobaleEinstellungen.aktbedienelementhintergrundfarbe) ... self.editsuchen = QAcccessibilityEdit(self) self.editersetzen = QAcccessibilityEdit(self) You already have a custom class, so now just use it in your code. One note, do note use name starting with Q, it will only confuse people working on that code thinking it's an official Qt class until they find your custom declaration.
  • QTCreator builds in temp folder when running CMake

    Unsolved
    2
    0 Votes
    2 Posts
    804 Views
    G
    I know this post is quite old, but maybe some folks might find this useful. I've had the same problem and I've solved it by changing the build directory of the project (in the project menu on the left) to a folder that already exists. In this way, QtCreator builds directly to that folder, rather than creating a new temporary one. Clearly this is just a workaround but it might be enough for some.
  • How i can save readings from sensor into Documents

    Unsolved
    2
    0 Votes
    2 Posts
    163 Views
    Christian EhrlicherC
    You can just create a csv file. See QFile and QTextStream for example.
  • Updates on Qt3D backend replacement? (RHI implementation timeframe?)

    Unsolved
    2
    0 Votes
    2 Posts
    225 Views
    Christian EhrlicherC
    @plantman said in Updates on Qt3D backend replacement? (RHI implementation timeframe?): If anyone has any information or advice, I would appreciate it. Then better ask at the qt-interest mailing list.
  • Am I misunderstanding or misusing QCryptographicHash::hash()?

    Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    JonBJ
    @In-Fo It's also nicer when you post two similar questions that you tell us about the other one: https://forum.qt.io/topic/120008/am-i-misunderstanding-or-misusing-qbytearray-tohex. And is the answer you are looking for here affected by the answer you have received there?
  • Error creating project or loading project

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    A
    Hey everyone thanks for the help. I managed to fix it by uninstalling and reinstalling mingw64 using the maintenance tool. Thanks again
  • Am I misunderstanding or misusing QByteArray::toHex()?

    Solved
    2
    0 Votes
    2 Posts
    239 Views
    Chris KawaC
    If first element in data is 0x00 then QByteArray(data) will be empty (it assumes a null terminated string). Pass the size as a second parameter.
  • What units of time does QMutex::tryLock() take?

    Solved
    3
    0 Votes
    3 Posts
    298 Views
    I
    Missed it, thanks. It's milliseconds.
  • QGraphicsTextItem - Accept mouse events without changing appearance

    Unsolved
    2
    0 Votes
    2 Posts
    260 Views
    JonBJ
    @MS_GX said in QGraphicsTextItem - Accept mouse events without changing appearance: setTextInteractionFlags(QtGui.Qt.TextSelectableByMouse) Purely at a guess. If that flag does selection which you do not want, and it can't be done some other way, then I would try looking at https://doc.qt.io/qt-5/qgraphicstextitem.html#sceneEvent for the mouse event, or possibly using https://doc.qt.io/qt-5/qgraphicstextitem.html#boundingRect to compare a scene mouse position against the rectangle of the text item?
  • How change text color in paintEvent() method in subclass of QPushButton?

    Solved
    1
    0 Votes
    1 Posts
    821 Views
    No one has replied
  • Dialog does not close correctly

    Solved qdialog close
    3
    0 Votes
    3 Posts
    1k Views
    O
    @JonB said in Dialog does not close correctly: Thanks, it works now. I created a custom slot for the Cancel button in my CMyDialog class. I this slot a put this->parentWidget()->close(). This solved the problem.
  • Signal connect issue on raspberry system

    Unsolved
    4
    0 Votes
    4 Posts
    293 Views
    jsulmJ
    @lalit_stpl said in Signal connect issue on raspberry system: so when i got code i use signal to send this where my slot in raspberry machine So, did you debug to see what happens? How should we know if you do not even post your code?
  • Qt 5.15.0 QHelpEngine index not working

    Unsolved
    3
    0 Votes
    3 Posts
    378 Views
    KutyusK
    @Pl45m4 The crawls are definitely good, the content tab works, only the index doesn't.
  • QT module compile problem.

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    sierdzioS
    It will be released in December. But first few releases will be quite, well, incomplete. A lot of modules are missing in 6.0 and will come back around 6.1 or 6.2 (so in December next year).
  • How to delete dots from QWidget?

    Solved
    18
    0 Votes
    18 Posts
    2k Views
    T
    @mrjj I have other question ( I ask to many questions to better understand delegate ). I would like to use that subclass of QStyledItemDelegate, but now I would like to see dots and selections ( QStyledItemDelegate removes dots and selection colors ). How? I check: std::cout<<index.row(); if(option.state & QStyle::State_Selected) std::cout<<"selected"; if(option.state & QStyle::State_HasFocus) std::cout<<"focus"; and I see that item, which I hover give me text "selected" and "focus". So I would like to use subclass of QStyledItemDelegate and have dots and selections colors.
  • Develop for android java issues

    Solved quick android mobile
    28
    0 Votes
    28 Posts
    9k Views
    KroMignonK
    @Phips04 Your welcome