Ok, that works! It took me a while to figure out how to write to proper code, but here's what I did to get it working:
void MainWindow::onColor()
{
if(color.isValid())
{
textColorName = color.name();
QMessageBox::information(this,
"Text Color",
"You selected "+textColorName
);
}
}
void MainWindow::onColor()
{
QColor color = QColorDialog::getColor(Qt::black, this, "Text Color", QColorDialog::DontUseNativeDialog);
if(color.isValid())
{
textColorName = color.name();
QMessageBox::information(this, "Text Color", "You selected "+textColorName);
}
}
To copy to clipboard, switch view to plain text mode
Thanks for your help!
Bookmarks