how to show QComboBox item with first item in ComboBox.
-
I am trying to create ComboBox with Qt designer , adding item through code "addItem" but I am not able to see my first item in QComboBox , list is coming but want to see first item in ComboBox.
combo = QComboBox(self) combo.addItem("Apple") combo.addItem("Pear") combo.addItem("Lemon")
-
@yashi95 https://doc.qt.io/qt-5/qcombobox.html#currentIndex-prop
combo = QComboBox(self) combo.addItem("Apple") combo.addItem("Pear") combo.addItem("Lemon") combo.setCurrentIndex(0)
-
@yashi95 So, now you're asking about look and feel? Is your original question answered?
By default your app should look and behave like the platform suggests (for example on Windows 10 it should look like Windows 10 apps usually look like). If you really want to change that then take a look at https://doc.qt.io/qt-5/stylesheet.html
-
Hi,
Beware, trying to get the look and feel of a platform to another will get you in trouble with your users. People using Linux do not expect to have a Windows or macOS look on their application unless they specifically use a Window Manager that does that.