Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. highlight

    Log in to post
    • All categories
    • G

      Unsolved Creator doesn't detect Qt libraries
      Tools • creator libraries highlight syntax dependencies • • GoshCo

      1
      0
      Votes
      1
      Posts
      25
      Views

      No one has replied

    • F

      Solved Find and highlight a specific row in tableview
      General and Desktop • table view focus highlight examples • • FumbleFingers

      8
      0
      Votes
      8
      Posts
      116
      Views

      JonB

      @FumbleFingers said in Find and highlight a specific row in tableview:

      It may not be everyone's favourite coding style, but it works for me.

      Umm, you assign to idx in the middle of passing a parameter, and then use it afterwards!? :)

    • M

      Unsolved Change in QTextLayout with Qt 6
      General and Desktop • highlight textedit format • • Maluna34

      5
      0
      Votes
      5
      Posts
      211
      Views

      SGaist

      Sorry for the late reply, it looks like there's indeed something changed in between.

      You should check the release notes just in case it was mentioned somewhere. If nothing, then please consider opening a new report on the bug report system if there's not already something there.

    • V

      Unsolved Qt change highlight error to red instead of white !
      Tools • highlight tool • • Valere21

      1
      0
      Votes
      1
      Posts
      154
      Views

      No one has replied

    • M

      Unsolved Add irreversible changes in a QPlainTextEdit
      General and Desktop • qplaintextedit highlight • • Maluna34

      2
      0
      Votes
      2
      Posts
      154
      Views

      SGaist

      Hi,

      AFAIK you cannot do it easily.

      Note that QTextBrowser can be made writable.

    • L

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

      8
      0
      Votes
      8
      Posts
      1493
      Views

      J.Hilk

      @legitnameyo

      QString str = textEdit->toPlainText(); QString targetChars = str.mid(textEdit->textCursor().columnNumber() -2 ,2); qDebug() <<targetChars;
    • U

      Unsolved Qtcreator changing color of block-highlighting
      Tools • qt creator highlight • • Uriel Elias

      4
      0
      Votes
      4
      Posts
      2149
      Views

      J

      Block highlighting color is based on some formula.
      Text background color is used.

    • Punit

      Unsolved QTableWidget Highlight Partial Text
      General and Desktop • qtablewidget highlight qt 5.5.1 • • Punit

      3
      0
      Votes
      3
      Posts
      1418
      Views

      Punit

      @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

    • observer5000

      Solved Syntax highlighting in QtCreator 4 win 7x64
      General and Desktop • highlight qtcreator 4.0.0 c++ windows 7 64 bi • • observer5000

      3
      0
      Votes
      3
      Posts
      916
      Views

      observer5000

      Hello. Thanks, I disabled clang plugin and now highlighting works in proper way

    • Joel Bodenmann

      Unsolved Highlighting widget
      General and Desktop • highlight • • Joel Bodenmann

      1
      0
      Votes
      1
      Posts
      837
      Views

      No one has replied

    • M

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

      4
      0
      Votes
      4
      Posts
      1905
      Views

      p3c0

      @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 } }
    • E

      Unsolved QTreeView::palette().highlight() is not the same color as seen!
      General and Desktop • qtreeview qpalette highlight • • esope

      4
      0
      Votes
      4
      Posts
      1655
      Views

      SGaist

      Hi,

      To add to @mrjj, the styles are free to ignore the palette or certain elements of the palette.

    • M

      Unsolved Generic Highlighter in Qt Creator for Bash
      Tools • qt creator highlight • • matpen

      1
      0
      Votes
      1
      Posts
      1048
      Views

      No one has replied

    • K

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

      2
      0
      Votes
      2
      Posts
      2176
      Views

      K

      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.

    • M

      Automatically highlight the first row of Qtreewidget?
      General and Desktop • c++ linux qtreewidget item row highlight • • marlenet15

      2
      0
      Votes
      2
      Posts
      1546
      Views

      SGaist

      Hi,

      You are looking for QTreeWidget::setCurrentItem