Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "QColor::fromRgb: RGB parameters out of range" Error

"QColor::fromRgb: RGB parameters out of range" Error

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.4k Views
  • 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.
  • H Offline
    H Offline
    Hwanwoo
    wrote on last edited by
    #1

    (I am using a translator. Please tell if you do not understand a word)
    Hello.
    An rgb-related error message appears intermittently in the "application output" message.

    QColor::fromRgb: RGB parameters out of range
    

    There are no ui problems and the program works normally.
    I checked to see if there was any code out of rgb scope, but I couldn't find it.
    I want to upload the ui file, but I don't know how to upload it.
    I'll write down the stylesheet code.

    title

    color: rgb(55,50, 50); 
    background-color: rgb(220, 232, 242); 
    

    label

    background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(40, 40, 40, 255), stop:0.5 rgba(120, 120, 120, 255), stop:1 rgba(100, 100, 100, 255)); 
    border: 1px solid #FFFFFF; 
    font: bold; 
    color: white; 
    

    tabwidget

    QTabWidget::pane { /* The tab widget frame */ 
        border-top: 2px solid rgba(194,199,203,255); 
    } 
    QTabWidget::tab-bar { 
        left: 10px; /* move to the right by 5px */ 
    
    } 
    /* Style the tab using the tab sub-control. Note that 
        it reads QTabBar _not_ QTabWidget */ 
    QTabBar::tab { 
        background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 
                         stop: 0 rgba(255,255,255,255), stop: 0.4 rgba(221,221,221,255), 
                         stop: 0.5 rgba(216,216,216,255), stop: 1.0  rgba(211,211,211,255)); 
        border: 2px solid rgba(196,196,196,255); 
        border-bottom-color: rgba(194,199,203,255); /* same as the pane color */ 
        border-top-left-radius: 2px; 
        border-top-right-radius: 2px; 
        min-width: 7ex; 
    	min-height: 5ex; 
        padding: 1px; 
    
    
    } 
    QTabBar::tab:selected, QTabBar::tab:hover { 
        background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 
                          stop: 0  rgba(250,250,250,255), stop: 0.4 rgba(244,244,244,255), 
                          stop: 0.5 rgba(231,231,231,255), stop: 1.0  rgba(250,250,250,255)); 
    
    } 
    QTabBar::tab:selected { 
        border-color: rgba(155,155,155,255); 
        border-bottom-color:  rgba(194,199,203,255); /* same as pane color */ 
    } 
    QTabBar::tab:!selected { 
        margin-top: 2px; /* make non-selected tabs look smaller */ 
    } 
    

    combobox & button

    QComboBox QAbstractItemView::item { 
    min-height: 30px; 
    background-color: rgb(170, 201, 239); 
    border-color: rgb(0, 0, 255); 
    selection-color: rgb(111, 111, 111); 
    } 
    QComboBox { 
    background: white; 
     } 
    QPushButton { 
    color: rgb(255, 255, 255); 
    background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(53, 83, 253, 255), stop:0.556604 rgba(0, 72, 128, 255), stop:0.985782 rgba(0, 72, 128, 255)); 
    border-color: rgb(74, 123, 161); 
    border-radius:7px; 
    }  
    QPushButton:checked { 
    color: rgb(255, 255, 255); 
    	background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(252, 84, 38, 255), stop:0.5 rgba(219, 68, 31, 255), stop:0.985782 rgba(207, 67, 29, 255)); 
    border-radius:7px; 
    } 
    QPushButton:disabled { 
     color: none; 
     }
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Remove the single stylesheets until the error no longer occurs so you will find out which stylesheet is the problem.
      You can also start your application with QT_FATAL_WARNINGS in your debugger to see from where it is called.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2

      • Login

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