Skip to content
QtWS25 Last Chance
  • QComboBox with icons but no text - how?

    Solved General and Desktop qcombobox qicon align
    6
    0 Votes
    6 Posts
    6k Views
    Chris KawaC
    @wavelike said: don't they use QComboBox-like widgets to offer different colors, brush thickness etc? Hm, I guess that's true, but I'd say it has more to do with QMenus and QToolButtons than QComboBox. But then again they are indeed similar in some ways. Oh well, the important thing is it's doable and quite easy ;)
  • QtTableWidgetItem Icon Text

    Unsolved General and Desktop qtablewidgetite qt4 qicon qtablewidget
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, You can try implementing a QStyledDelegateItem and paint only the icon. Hope it helps
  • [SOLVED] Compare QIcons

    General and Desktop qicon qt5
    5
    0 Votes
    5 Posts
    3k Views
    J
    @mrjj @jsulm Thanks you for your replies. As it turns out, the crash I mentioned was actually caused by a subtle, yet important bug in our test infrastructure: we have a special fixture that will instantiate and destruct the QApplication instance before respectively after each test case. We initiated the argc and argv parameters with variables local to the constructor. For some reason creating a QIcon causes Qt to access argv, in other words: a crash. Short story: both your suggestion, but also my original approach work perfectly!
  • 0 Votes
    3 Posts
    2k Views
    mrjjM
    @Aram Its completely ok. Just mark it as SOLVED and all will be happy
  • QIcon set default size

    General and Desktop qicon
    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, you can store the old values and restore them later class MyWindow: public MainWindow { .... private: QSize _originalSize; }; void MyWindow::changeIconSize() { _originalSize = iconSize(); setIconSize(...); } void MyWindow::restoreSize() { setIconSize(_originalSize); }