Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Portuguese
  4. [resolvido]combobox popup stylesheet
Forum Updated to NodeBB v4.3 + New Features

[resolvido]combobox popup stylesheet

Scheduled Pinned Locked Moved Portuguese
2 Posts 1 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    flaviomarcio
    wrote on last edited by
    #1

    Bom dia.
    Estou tentando configurar a lista popup do QComboBox mas não conseguindo modificar o tamanho da fonte.
    Alguem saberia como fazer isso?

    Tentei fazer da seguinte forma:
    @
    QLabel, QComboBox QAbstractItemView{
    color:red;
    font: 20pt bold;
    }@
    ou
    @QLabel, QAbstractItemView{
    color:red;
    font: 20pt bold;
    }@

    Com o QLabel ocorre tudo corretamente, mas com o [QAbstractItemView] apenas a color fonte é modificada ficandovermelha.

    Flavio Portela

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flaviomarcio
      wrote on last edited by
      #2

      Funcionou corretamente da seguinte forma:
      @
      int dpi=QPaintDevice::physicalDpiX();
      int fontsize=dpi/12; //modifique para aumentar(*) ou diminuir[/]
      QFont myf=QApplication::font();
      myf.setPixelSize(fontsize);
      QApplication::setFont(myf);@

      Flavio Portela

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved