Recently I came to SO in this question asking how could I get my hands on a QComboBox' QScrollBar in order to change its thickness. After reading the replies, I tried Marco A. solution for my Qt Embedded application and it didn't worked. Then, for test, I changed the compilation environment to Desktop and the fix worked!
So essentially my problem is that when I try to change a QComboBox's QScrollBar width in Qt for Embedded Linux (ARM), nothing happens, but if I compile the exact same code for Qt for Desktop, it works. The following is the code I'm using for tests:
QAbstractItemView* poView = ui->comboBox->view();
QScrollBar* poBar = poView->verticalScrollBar();
poBar->setStyleSheet("width: 50px;");
and there is another code that does the same, but shows the same problem:
ui->comboBox->setStyleSheet("QScrollBar:vertical { width: 50px; }");
With comboBox being declared in the ui form in Qt Designer (inside Qt Creator).
Qt versions are the same for Desktop and Qt for Embedded Linux (4.8.5). Another thing I found strange (but should have nothing to do with it) is that compiling the same code again for Desktop shows a QComboBox with a Windows XP style, while for Embedded the Plastique style is used (I notice that quite clearly due to Plastique showing three instead of two buttons to scroll the scroll bar).
So what could be happening? How may I solve this problem?
I noticed the same symptoms. In Qt a lot of the drawing, I understand, has been delegated to the styles, and the Plastique style seems to have a bug in that it doesn't seem to draw a vertical scroll bar in the right coordinates if it doesn't have the default size. So if you do this:
QScrollBar:vertical
{
min-width: 35px;
width: 35px;
}
you end up with the symptoms you described. But, AFAICS there's something wrong with the handling of margins as well! If you play around with the margins, e.g. like this:
QScrollBar:vertical
{
min-width: 35px;
width: 35px;
margin-right: 35px;
}
you should be able to work around the bug.
Worked for me at least.
poBar->setMinimumWidth(50);
poBar->setMaximumWidth(50);
I tried it with PyQt5, QT5 in Python3-syntax, it customizes the width of the Scrollbar on Linux (Ubuntu 14.04) as well as on windows7
Related
Strangely, it started happening since Chrome94 and only on my Android phone (while everywhere else it still works fine like in my Android tablet).
When border-radius: 30px; is removed from the class that has backdrop-filter: blur(8px); in it, the DIV now appears with the default sharp corners (that we don't want) but the glassmorphism actually goes back to functioning as expected and the great look starts working again on the phone as well. So the question is,
Is there a way to make the beautiful backdrop-filter: blur() work without sacrificing the beauty of rounded corners?
Already tried and failed, using pseudo elements like ::before but the result is the exact same.
Also tried and failed applying filter: blur(0px); to the underlying element that is supposed to get blurred but that changed absolutely nothing in my tests.
Note 1: No problems observed on Windows PC Chrome and ASUS tablet Chrome.
Note 2: It used to work fine on the SONY phone too before updating to Chrome94 (that is if my memory is correct)
Problem: I developed a single page website with Reactjs and deployed it to Heroku (It is a remake of an existing website. I want to include it as a part of my portfolio for entry-level web dev job). When inspecting on Chrome Toggle device toolbar, the responsive website worked fine in stimulated mobile and ipad. When opening the site in my iPhone7 Plus, it also worked fine. But when opening in a real iPad, several section elements did not position as expected - they overlapped.
The affected elements are child elements of a container element which has CSS style overflow: auto. display: flex, flex-direction: column. The effect I want to achieve is that all the main contents (except navigation menu, footer and sidebar) are included in a scroll-able container.
Screenshot of the website in ipad browser
I spent some time trying to search for answer on the Internet but did not get any luck.
Question: How to make the responsive website works properly in iPad devices?
After multiple trials and searches on Stackoverflow, I finally found out the solution.
I came across a stackoverflow question and noticed the similarity of my problem. In the case of my project, the container element's styles include overflow: auto, display: flex, flex-direction: column. For some reason (I still do not understand the theory behind this), when the web app is opened in an iPad browser, the container's child elements (flex items) shrink automatically. That is why child elements overlapped with each other. To solve this, I set CSS style flex-shrink: 0 for each child element. Now the app works properly in iPad.
The link to the other stackoverflow question is as follows:
flex items overlapping in Safari (iPad)
Hopefully someone can help me here.
I'm working in Oracle Apex and have a side navigation menu which expands and shrinks. In both versions there is a visible web browser vertical scroll bar.
Is it possible to hide this but still maintain the scroll feature?
For example this sample application I found online (https://apex.oracle.com/pls/apex/f?p=42599:1::::::) contains the same functionality but without the scrollbar present. Looks a lot cleaner and doesn't get in the way of text / icons etc.
Here is a picture to show both systems.
Thank you
If you want this behaviour throuhought the application, define the below CSS code either on the page 0 or in a global CSS file.
/* Hide scrollbar for Chrome, Safari and Opera*/
.t-TreeNav::-webkit-scrollbar {
display: none;
}
/*Hide scrollbar for IE, Edge and Firefox */
.t-TreeNav {
-ms-overflow-style: none; /*IE and Edge*/
scrollbar-width: none; /*Firefox */
}
I'm creating a gui in Qt Creator in ubuntu, and I have a big rectangular button that I'm trying to turn into a circle or oval. It won't let me edit the code in edit mode, I can only change how it looks in design mode I think, which isn't helping me. How do I do this?
The look of buttons (and other widgets) is controlled by "style sheets".
I don't have Qt creator in front of me at the moment, but if you select the button in the designer and look at the properties there is something there that opens a dialog that let's you enter "css" to control the look of the button.
After looking at QtCreator, the property to edit is called "styleSheet".
Example:
QPushButton {
border-color: rgb(66, 69, 183);
border-width: 3px;
border-style: solid;
border-radius: 40px;
margin:30px;
padding:30px;
}
Gives
This is a two part problem. Solving it for Firefox breaks IE6, and solving it for IE6 breaks Firefox. WebKit works fine.
This demonstrates the problem in Firefox: http://jsfiddle.net/UpZca/2/
"Import Submission" link is slightly higher than "Export Submission", which is a problem. IE6 works fine at this point - the alignment is correct.
I know that when using 'inline-block', vertical alignment issues can be fixed with vertical-align:top, so I tried that first. You can see that it fixes the problem in Firefox: http://jsfiddle.net/UpZca/1/
However, with this change IE6 decided that it is going to move "Import Submission" down all the way to the bottom of the invisible file input. Take a look at the last link again in IE6 to see what I mean.
btw, jsfiddle doesn't render the code the same way as pure IE6 does. In the links above, my text is covered up by the gray Browse button from the file input. In pure IE6 that doesn't happen, but this still demonstrates the positioning problem.
So, is there any way for me to make this code work in IE6 and Firefox?
Any ideas would be appreciated (except the one about not using IE6 :))
I ended up using Javascript to programatically add the vertical-align: top style if the browser is not IE.
A brief look tells me that the problem might be because IE6 does not support inline-block. Whenever you use inline-block, you will also need to do this:
*display: inline;
*zoom: inline;
These two lines are equivalent to display: inline-block for IE 6 and 7.
With this set, you can then probably figure out a cross-browser solution for the issue by adding vertical-align: top to the first anchor tag or qq-upload_button.