Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • QJsonObject, how to get size in terms of bytes

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    SPlattenS
    @JKSH , thank you, this is exactly what I wanted.
  • 0 Votes
    4 Posts
    908 Views
    P
    @chilarai - Could you please let me know what exactly you did to get rid of this assertion? I'm having a similar problem with my tree view and struggling for two days. ANy help is greatly appreciated. Thank you!
  • QListWidget - Keep track of moved rows

    Solved
    5
    0 Votes
    5 Posts
    636 Views
    H
    @JonB So I came up with a solution. I use a variable to store the difference between the position of the row I want to keep track and the last row position out of the selected rows. //mRowsDifference - holds the position of the row I want to keep track of void PlaylistPage::onRowsMoved(const QModelIndex &, int start, int end, const QModelIndex &, int row) { mCurrentPlayingIndex = this->selectedIndexes().last().row() - mRowsDifference; // after the last row is moved mCurrentPlayingIndex will be holding the new position } void PlaylistPage::dragMoveEvent(QDragMoveEvent *event) { mRowsDifference = this->selectedIndexes().last().row() - mCurrentPlayingIndex; QListWidget::dragMoveEvent(event); } I will be making more tests but until it seems to be working
  • Bug in QMediaPlayer version 6.2

    Unsolved
    3
    0 Votes
    3 Posts
    314 Views
    F
    Even with the final version identical error on every Linux, while with the beta libraries QMediaPlayer works normally. Does anyone have the same error? In QGraphicsView the error does not occur. In the Mediaplayer present in the example code, the one based on qml works normally, the one on widget has the same bug.
  • QT Virtual Keyboard not appears

    Unsolved
    22
    0 Votes
    22 Posts
    3k Views
    SGaistS
    Did you check that all the dependencies of it are also deployed/available ?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QUndoStack with dropdown

    Unsolved
    7
    0 Votes
    7 Posts
    544 Views
    JonBJ
    @SGaist said in QUndoStack with dropdown: You would need to implement your own model to set on the QComboBox. @vijaychsk Given what @SGaist is pointing it out here, you would have to write some code to replicate the functionality. Using your button to icon to "pop up" a QUndoView in some shape or form sounds like less work than utilising a QComboBox. You might want to bear that in mind.
  • Qt application run on Sitrara board AM5749 touch perfomance issue.

    Unsolved
    5
    0 Votes
    5 Posts
    501 Views
    SGaistS
    I do not own such a board. You should contact the company that builds them.
  • QAbstractItemModel::rowsMoved signal behavior

    Solved
    9
    0 Votes
    9 Posts
    833 Views
    H
    @Christian-Ehrlicher Ok Thank you for the clarification
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • Text Glyphs overlap, vcpkg build

    Solved
    5
    0 Votes
    5 Posts
    664 Views
    G
    If anyone finds this same problem, what solved it for me was to add "harfbuzz" to the list of dependencies, now everything is working just fine!
  • Not enough space in Horizontal Header?

    Solved qtableview
    4
    0 Votes
    4 Posts
    916 Views
    F
    I fixed it with: setStyleSheet("QHeaderView::section{ padding-left: 4px; padding-top: 1; padding-bottom: 1; }");
  • Action Button in MenuBar

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    L
    @jsulm said in Action Button in MenuBar: setCurrentIndex Thanks a lot I tried the setCurrentIndex method and it worked! like magic.
  • QByteArray to quint16

    Unsolved
    8
    0 Votes
    8 Posts
    884 Views
    VRoninV
    @JKSH said in QByteArray to quint16: There are not enough bytes, so you will get a QDataStream::ReadPastEnd For Qt 5.7 or later: quint16 var; stream.startTransaction(); stream >> var; if(!stream.commitTransaction()){ quint8 tempVar; stream.startTransaction(); stream >> tempVar; if(!stream.commitTransaction()){ //handle this error } var=tempVar; }
  • Set Gif as Background of QFrame.

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    JonBJ
    @AlexKrammer Just a small point. @eyllanesc uses a member variable for mMovie. You use a local variable for QMovie *movie = new QMovie(...). Be aware that this means you leak a QMovie. If your on_btn_ON_clicked() can be called more than once you have no way of releasing the previously-created movie (unless whatever your GifEffect *effect is does that for you). And the same leak applies to your GifEffect *effect = new GifEffect();, unless your ui->frm_BG->setGraphicsEffect(effect) looks after that too. Your on_btn_OFF_clicked() sets that to Q_NULLPTR, does that release any current GifEffect and its QMovie?
  • How define a good Qt3D OrbitCamera controller

    Unsolved
    1
    0 Votes
    1 Posts
    278 Views
    No one has replied
  • Dump with Dr. Mingw

    Unsolved
    1
    0 Votes
    1 Posts
    150 Views
    No one has replied
  • Run npm with QProcess under MacOs(osx)

    Unsolved
    14
    0 Votes
    14 Posts
    1k Views
    jsulmJ
    @Dannick-Stark One correction to what I wrote before (thanks @JonB for the hint): if you use "sh -c" then on Linux you have to pass everything after -c as ONE string!
  • QMainWindow, no title, border

    Solved
    4
    0 Votes
    4 Posts
    748 Views
    jsulmJ
    @SPlatten It's a widget, so simply add it to your window like any other widget and add it to the layout, so it consumes whole space. Then put all other widgets inside the frame.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied