Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. highlight
    Log in to post

    • SOLVED Get the last two characters written in a QTextEdit
      General and Desktop • qtextedit selection highlight • • legitnameyo  

      8
      0
      Votes
      8
      Posts
      297
      Views

      @legitnameyo QString str = textEdit->toPlainText(); QString targetChars = str.mid(textEdit->textCursor().columnNumber() -2 ,2); qDebug() <<targetChars;
    • UNSOLVED Qtcreator changing color of block-highlighting
      Tools • qt creator highlight • • Uriel Elias  

      4
      0
      Votes
      4
      Posts
      1494
      Views

      Block highlighting color is based on some formula. Text background color is used.
    • UNSOLVED QTableWidget Highlight Partial Text
      General and Desktop • qtablewidget qt 5.5.1 highlight • • Punit  

      3
      0
      Votes
      3
      Posts
      970
      Views

      @VRonin I am trying to do this. I am a newbiew, so need your assistance. Hope you can understand. Here are some rough code. MediaFileItemDelegate::MediaFileItemDelegate(QObject *parent) :QStyledItemDelegate(parent) { } MediaFileItemDelegate::~MediaFileItemDelegate() { } void MediaFileItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option,const QModelIndex& index) const { QString str = qvariant_cast<QString>(index.data()); painter->save(); painter->setPen(Qt::NoPen); // painter->drawRect(option.rect); if(index.data().toString().contains("xyz")) { painter->setPen(Qt::blue); painter->drawText(option, str); } else { QStyledItemDelegate::paint(painter, option, index); } painter->restore(); } Currently this code is highlighting the whole text (example: My name is xyz) and I am doing manually matching. So how can i select only xyz. Thanks
    • SOLVED Syntax highlighting in QtCreator 4 win 7x64
      General and Desktop • c++ windows 7 64 bi highlight qtcreator 4.0.0 • • observer5000  

      3
      0
      Votes
      3
      Posts
      760
      Views

      Hello. Thanks, I disabled clang plugin and now highlighting works in proper way
    • UNSOLVED Highlighting widget
      General and Desktop • highlight • • Joel Bodenmann  

      1
      0
      Votes
      1
      Posts
      604
      Views

      No one has replied

    • UNSOLVED QML: ListView highlightFollowsCurrentItem and shortest path
      General and Desktop • listview model delegate highlight • • Mark81  

      4
      0
      Votes
      4
      Posts
      1543
      Views

      @Mark81 If index is 0 then don't start the animation. Well something like: property int myIndex : 0 function animate(idx) { listAnimation.running = false var pos = list.contentY; var destPos; list.positionViewAtIndex(idx, ListView.Beginning); destPos = list.contentY; listAnimation.from = pos; listAnimation.to = destPos; listAnimation.running = true; } Timer { ... onTriggered: { if(myIndex==0) list.positionViewAtIndex(myIndex,ListView.Beginning); else animate(myIndex) myIndex++ if(myIndex==list.count-1) myIndex = 0 } }
    • UNSOLVED QTreeView::palette().highlight() is not the same color as seen!
      General and Desktop • qtreeview highlight qpalette • • esope  

      4
      0
      Votes
      4
      Posts
      1395
      Views

      Hi, To add to @mrjj, the styles are free to ignore the palette or certain elements of the palette.
    • UNSOLVED Generic Highlighter in Qt Creator for Bash
      Tools • qt creator highlight • • matpen  

      1
      0
      Votes
      1
      Posts
      846
      Views

      No one has replied

    • UNSOLVED TableView highlight column on mouse-over
      QML and Qt Quick • tableview mouse highlight columnat • • KiNgFrUiT  

      2
      0
      Votes
      2
      Posts
      1728
      Views

      Ive been looking into this a bit more myself and ive found that the TableView headerVisible property makes a big difference. I am currently hiding the header. When headerVisible=false then tableView.__listView.columnAt(x) always returns -1. When headerVisible=true then tableView.__listView.columnAt(x) works correctly. Id like to keep the table's header hidden if possible, hopefully a workaround for tableView.__listView.columnAt(x) is possible. Also, im on Windows with Qt5.5.1 mingw if that makes any difference.
    • Automatically highlight the first row of Qtreewidget?
      General and Desktop • c++ linux qtreewidget item row highlight • • marlenet15  

      2
      0
      Votes
      2
      Posts
      1247
      Views

      Hi, You are looking for QTreeWidget::setCurrentItem