[Development] API style guide: scoped enum or not?

Jaroslaw Kobus Jaroslaw.Kobus at qt.io
Thu May 4 18:15:29 CEST 2023

>> On 4 May 2023, at 17:34, Marc Mutz via Development <development at qt-project.org> wrote:
>> On 04.05.23 15:38, Volker Hilsheimer via Development wrote:
>>> Should we have Qt::TextLayout::Horizontal and Qt::Layout::Horizontal? Or QSlider::Orientation::Horizontal?
>> Without looking at the docs, tell me what QSplitterHandle::orientation()
>> means :)
> The same that it would mean if it would return Qt::Orientation::Horizontal or Qt::HorizontalOrientation :)
> I’m guessing: whether the handle gets dragged horizontally or vertically, ie the opposite of what one would expect (whether the handle is v horizontal or vertical line). In which case the problem is the name of the property not of the enum type.

I remember that couple of years ago Eike did a pool on how name actions regarding horizontal and vertical splitting inside QtCreator. So, for some, the "horizontal" means that they want to see a horizontal splitter bar after the split, and for others it means that they want to see horizontally arranged editors (from left to right). The outcome was that we have now "Split" and "Split Side by Side" actions.


More information about the Development mailing list